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.

GET

Base URL

All requests are sent to a single endpoint and must include your API key in the api_key parameter.

Endpoint
https://dualsms.com/api/stubs/handler_api.php

Authentication required. Every API request must include your unique API key for authentication. You can find and regenerate your key in your account dashboard.

GET

Balance Check

Check your current account balance.

Request URL

GET
https://dualsms.com/api/stubs/handler_api.php?action=getBalance&api_key=$api_key

Parameters

  • api_keyrequired

    Your API key

Success response

  • ACCESS_BALANCE:$yourBalance

    Returns your current balance

Possible errors

  • BAD_KEYInvalid API key
GET

Number Purchase

Purchase a phone number for SMS verification.

Request URL

GET
https://dualsms.com/api/stubs/handler_api.php?api_key=$api_key&action=getNumber&service=$service&country=$country&operator=$operator

Parameters

  • api_keyrequired

    Your API key

  • servicerequired

    Service code

  • countryrequired

    Country code

  • operatorrequired

    Operator code

Success response

  • ACCESS_NUMBER:$activationId:$phoneNumber

    Activation ID and rented phone number

Possible errors

  • BAD_KEYInvalid API key
  • BAD_ACTIONIncorrect action
  • BAD_SERVICEIncorrect service
  • BAD_COUNTRYIncorrect country
  • BAD_OPERATORIncorrect operator
  • ACCOUNT_BANAccount banned
  • NO_CONNECTIONNo connection
  • NO_BALANCEInsufficient balance
  • ERROR_DATABASEDatabase error
GET

Request For SMS

Check the status of your SMS verification.

Request URL

GET
https://dualsms.com/api/stubs/handler_api.php?api_key=$api_key&action=getStatus&id=$id

Parameters

  • api_keyrequired

    Your API key

  • idrequired

    Activation ID

Success response

  • STATUS_WAIT_CODE

    Waiting for SMS

  • STATUS_WAIT_RESEND

    Waiting for resend

  • STATUS_CANCEL

    Activation canceled

  • STATUS_OK:'code'

    SMS received with code

Possible errors

  • BAD_KEYInvalid API key
  • BAD_ACTIONIncorrect action
  • NO_ACTIVATIONInvalid activation ID
  • ACCOUNT_BANAccount banned
GET

Change Activation Status

Update the status of your activation.

Request URL

GET
https://dualsms.com/api/stubs/handler_api.php?api_key=$api_key&action=setStatus&status=$status&id=$id

Parameters

  • api_keyrequired

    Your API key

  • idrequired

    Activation ID

  • statusrequired

    Status code: 3 = request another code, 8 = cancel/complete activation

Success response

  • ACCESS_READY

    Number ready

  • ACCESS_RETRY_GET

    Waiting for new SMS

  • ACCESS_ACTIVATION

    Service activated

  • ACCESS_CANCEL

    Activation canceled

Possible errors

  • NO_ACTIVATIONInvalid activation ID
  • BAD_STATUSIncorrect status
  • BAD_KEYInvalid API key
  • BAD_ACTIONIncorrect action
  • EARLY_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.