The sms-activate compatible endpoint
Keep using bots and panels built for the sms-activate protocol by changing one URL. Supported actions, id formats and the differences to know.
On this page
Many tools speak the sms-activate protocol. SmsGrab offers a compatible endpoint, so these tools work once you change the base URL and use your SmsGrab API key.
Endpoint
https://smsgrab.com/api/stubs/handler_api.php
Send api_key and action plus the parameters of the action, by GET or POST. The key can also be sent as Authorization: Bearer.
Example
curl -s "https://smsgrab.com/api/stubs/handler_api.php?api_key=$SMSGRAB_KEY&action=getBalance"
curl -s "https://smsgrab.com/api/stubs/handler_api.php?api_key=$SMSGRAB_KEY&action=getNumber&service=tg&country=6"
curl -s "https://smsgrab.com/api/stubs/handler_api.php?api_key=$SMSGRAB_KEY&action=getStatus&id=100000123"
curl -s "https://smsgrab.com/api/stubs/handler_api.php?api_key=$SMSGRAB_KEY&action=setStatus&id=100000123&status=6"
ACCESS_BALANCE:12.34
ACCESS_NUMBER:100000123:6281234567890
STATUS_WAIT_CODE
STATUS_OK:482913
ACCESS_ACTIVATION
Supported actions
| Action | What it does |
|---|---|
getBalance, getBalanceAndCashBack |
Your balance |
getNumber, getNumberV2 |
Buy a number |
setStatus |
1 ready, 3 wait for another SMS, 6 finish, 8 cancel and refund |
getStatus, getStatusV2 |
Waiting, code received or cancelled |
getActiveActivations |
Numbers that are still active |
getPrices, getTopCountriesByService, getNumbersStatus |
Prices and stock |
getCountries, getServicesList |
Countries and services with their ids |
Ids
- Services use the protocol's short codes where one exists, such as
waWhatsApp,tgTelegram,goGoogle,fbFacebook,igInstagram anddsDiscord. Our own service ids work too. - Countries use the protocol's numeric ids where one exists, such as
0Russia,6Indonesia,4Philippines,22India and187USA. Our ids and ISO codes work too. getCountriesandgetServicesListreturn the complete, current lists.- An activation
idis a number such as100000123, and the REST API accepts it as well.
Differences to know
- Amounts are in US dollars with two decimals, at your developer price. They are not roubles.
operatoris ignored; the best available offer is chosen for you.- Errors are answered like the original protocol, with HTTP 200 and a text such as
NO_NUMBERS,NO_BALANCEorBAD_KEY. Too many requests get HTTP 429 withTOO_MANY_REQUESTS. NO_ACCESSmeans the key lacks the purchase scope, the IP address is not allowed or the daily spend cap has been reached.- Rentals are not available through this endpoint.
Everything else is shared with the REST API: the same keys, limits, prices, refunds and webhooks.
Was this article helpful?
Thanks! Glad it helped.