Choose a language

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
  1. Endpoint
  2. Example
  3. Supported actions
  4. Ids
  5. Differences to know

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

Text
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

Bash
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"
Text
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 wa WhatsApp, tg Telegram, go Google, fb Facebook, ig Instagram and ds Discord. Our own service ids work too.
  • Countries use the protocol's numeric ids where one exists, such as 0 Russia, 6 Indonesia, 4 Philippines, 22 India and 187 USA. Our ids and ISO codes work too.
  • getCountries and getServicesList return the complete, current lists.
  • An activation id is a number such as 100000123, 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.
  • operator is 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_BALANCE or BAD_KEY. Too many requests get HTTP 429 with TOO_MANY_REQUESTS.
  • NO_ACCESS means 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?

Still need help?

Write to us. We answer every message, usually within a few hours.

Or email us at support@smsgrab.com