Request a number
action=getNumberPlain text Changes your accountReserves a number and charges your balance. The price is final — if no SMS arrives before the activation expires, the full amount is refunded automatically. If the cheapest server runs out mid-purchase we fail over to the next one at the same price or lower.
https://dualsms.com/stubs/handler_api.php?api_key=$api_key&action=getNumber&service=$service&country=$country&maxPrice=$maxPrice&providerIds=$providerIds&operator=$operatorParameters
api_key required | Your API key (Settings → API). |
service required | Service code, e.g. wa for WhatsApp. See the service codes table. |
country required | Country: SMS-Activate numeric id (22 = India) or ISO code (in). See the country codes table. |
maxPrice optional | Highest price you accept, in your balance currency. If the current price is higher you get WRONG_MAX_PRICE instead of a number. |
providerIds optional | Buy only on these servers, comma-separated: 1,2,3 (the numbers on the site's Server 1, Server 2… — getPricesV3 lists them with prices). The cheapest of them is used and failover stays within them; none in stock → NO_NUMBERS. |
operator optional | Same as providerIds (for bots that send operator). Values that aren't server numbers, like any, mean any server. |
Responses
ACCESS_NUMBER:$id:$phoneNumber reserved. Save $id — you need it for getStatus and setStatus.
Possible errors
curl "https://dualsms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getNumber&service=wa&country=22"
Example response
ACCESS_NUMBER:66f1c0a2e4b0c1a2b3c4d5e6:919810427735
Try this method
Sign in to run it with your own key.