A handler_api compatible with sms-activate: same actions, statuses, country and service codes, plus a code webhook.
handler_api URL
https://allinsms.com/stubs/handler_api.php
REST API base
https://allinsms.com/api/v1
GET or POST with api_key and action. Countries use the standard numeric ids (getCountries) and services the standard codes (tg, wa, go …). Responses are plain text unless noted.
GET https://allinsms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getNumber&service=tg&country=6| action | Parameters | Response | Description |
|---|---|---|---|
| getBalance | None | ACCESS_BALANCE:12.3400 | Current balance in USD. |
| getNumber | service, country, maxPrice? | ACCESS_NUMBER:1042:6281244739021 | Buy a number. Charged immediately, refunded if no code arrives. |
| getNumberV2 | service, country, maxPrice? | {"activationId":1042,"phoneNumber":"628…","activationCost":"0.7800",…} | Same as getNumber, JSON response with price and end time. |
| getStatus | id | STATUS_WAIT_CODE · STATUS_OK:48213 · STATUS_WAIT_RETRY:48213 · STATUS_CANCEL | Poll every 3 to 5 seconds until a code arrives. |
| getStatusV2 | id | {"verificationType":0,"sms":{"code":"48213","text":"…"},"call":null} | JSON status with the full SMS text. |
| getFullSms | id | FULL_SMS:Your code is 48213 | Full text of the last SMS. |
| setStatus | id, status=1|3|6|8 | ACCESS_READY · ACCESS_RETRY_GET · ACCESS_ACTIVATION · ACCESS_CANCEL | 1 ready, 3 another code, 6 finish, 8 cancel (after the wait time, before a code). |
| getActiveActivations | None | {"status":"success","activeActivations":[…]} | Your numbers that are still active. |
| getPrices | service?, country? | {"6":{"tg":{"cost":"0.7800","count":5320}}} | Price and stock by country and service. |
| getNumbersStatus | country? | {"tg_0":"5320","wa_0":"812",…} | Stock per service for a country. |
| getCountries | None | {"6":{"id":6,"eng":"Indonesia","iso":"id","phoneCode":"62",…}} | Country list with ids. |
| getServicesList | None | {"status":"success","services":[{"code":"tg","name":"Telegram"}]} | Service codes and names. |
setStatus values
Timing
Numbers are active for 20 minutes by default. Cancel is accepted 120 seconds after purchase (earlier returns EARLY_CANCEL_DENIED). Without a code the activation is refunded automatically when it ends. Rate limit: 300 requests per minute per key.
Set a webhook URL in Account and we POST every received code to it as JSON, retrying twice if your server does not answer 2xx.
POST https://your-server/webhook
{ "activationId": 1042, "service": "tg", "country": "id", "phone": "6281244739021",
"code": "48213", "text": "Telegram code: 48213 …", "receivedAt": "2026-10-09T03:12:44.000Z" }Created in your browser. We keep only its hash.