Developers
DUAL SMS API documentation
A simple HTTP API to automate OTP verification — check balance, rent numbers, receive SMS codes, and manage activations from your own backend.
Pass your key in the api_key parameter on every request.
Keep your key private and never expose it in client-side code.
Regenerate your key immediately if it is ever compromised.
Base URL
All requests are sent to a single endpoint and must include your API key in the api_key parameter.
https://dualsms.com/api/stubs/handler_api.phpAuthentication required. Every API request must include your unique API key for authentication. You can find and regenerate your key in your account dashboard.
Balance Check
Check your current account balance.
Request URL
https://dualsms.com/api/stubs/handler_api.php?action=getBalance&api_key=$api_keyParameters
api_keyrequiredYour API key
Success response
ACCESS_BALANCE:$yourBalanceReturns your current balance
Possible errors
BAD_KEYInvalid API key
Number Purchase
Purchase a phone number for SMS verification.
Request URL
https://dualsms.com/api/stubs/handler_api.php?api_key=$api_key&action=getNumber&service=$service&country=$country&operator=$operatorParameters
api_keyrequiredYour API key
servicerequiredService code
countryrequiredCountry code
operatorrequiredOperator code
Success response
ACCESS_NUMBER:$activationId:$phoneNumberActivation ID and rented phone number
Possible errors
BAD_KEYInvalid API keyBAD_ACTIONIncorrect actionBAD_SERVICEIncorrect serviceBAD_COUNTRYIncorrect countryBAD_OPERATORIncorrect operatorACCOUNT_BANAccount bannedNO_CONNECTIONNo connectionNO_BALANCEInsufficient balanceERROR_DATABASEDatabase error
Request For SMS
Check the status of your SMS verification.
Request URL
https://dualsms.com/api/stubs/handler_api.php?api_key=$api_key&action=getStatus&id=$idParameters
api_keyrequiredYour API key
idrequiredActivation ID
Success response
STATUS_WAIT_CODEWaiting for SMS
STATUS_WAIT_RESENDWaiting for resend
STATUS_CANCELActivation canceled
STATUS_OK:'code'SMS received with code
Possible errors
BAD_KEYInvalid API keyBAD_ACTIONIncorrect actionNO_ACTIVATIONInvalid activation IDACCOUNT_BANAccount banned
Change Activation Status
Update the status of your activation.
Request URL
https://dualsms.com/api/stubs/handler_api.php?api_key=$api_key&action=setStatus&status=$status&id=$idParameters
api_keyrequiredYour API key
idrequiredActivation ID
statusrequiredStatus code: 3 = request another code, 8 = cancel/complete activation
Success response
ACCESS_READYNumber ready
ACCESS_RETRY_GETWaiting for new SMS
ACCESS_ACTIVATIONService activated
ACCESS_CANCELActivation canceled
Possible errors
NO_ACTIVATIONInvalid activation IDBAD_STATUSIncorrect statusBAD_KEYInvalid API keyBAD_ACTIONIncorrect actionEARLY_CANCEL_DENIEDToo early to cancel
Reference data
Access up-to-date lists of available countries, services, and operators from your dashboard. Use these codes in the service, country, and operator parameters when purchasing a number.
Ready to integrate?
Create an account, top up with UPI, and grab your API key to start automating verifications.
