SNSCodes

SMS Verification API

Buy numbers and read SMS codes with plain HTTP GET or POST requests. Answers use the text format of common SMS activation tools, private number calls answer in JSON.

Getting started

Address
https://snscodes.com/stubs/handler_api.php
Authentication
api_key parameter. Create the key on the API page of your account; it is shown once.
Rate limit
300 requests per minute per key
Money
Prices and credit in US dollars, taken from the same credit as the website.
curl "https://snscodes.com/stubs/handler_api.php?api_key=$KEY&action=getNumber&service=telegram&country=us"
# ACCESS_NUMBER:N-7KQ2M9XWD4:14155550123

curl "https://snscodes.com/stubs/handler_api.php?api_key=$KEY&action=getStatus&id=N-7KQ2M9XWD4"
# STATUS_OK:482913

Get credit action=getBalance

Returns your account credit in US dollars.

Answer
ACCESS_BALANCE:42.50
  • BAD_KEYThe key is missing or wrong.

Code prices action=getPrices

Prices per code by country and service. Both filters are optional.

ParameterRequiredDescription
servicenoService code, for example telegram
countrynous, gb or au
Answer
{"us":{"telegram":{"cost":3,"count":100}}}

Buy a code number action=getNumber

Buys one number for one app. The price is taken from your credit at once and returned if no code arrives in 20 minutes.

ParameterRequiredDescription
serviceyesService code from getPrices
countryyesus, gb or au
Answer
ACCESS_NUMBER:N-7KQ2M9XWD4:14155550123
  • BAD_SERVICEUnknown service code.
  • BAD_COUNTRYThe service is not sold for this country.
  • NO_BALANCENot enough credit. Nothing is charged.
  • NO_NUMBERSNo number available right now. Nothing is charged.
  • NO_ACTIVATIONSYou already have 20 open code numbers.

Read the code action=getStatus

Poll every 5 to 10 seconds until the code arrives.

ParameterRequiredDescription
idyesThe id from getNumber
Answer
STATUS_OK:482913
  • STATUS_WAIT_CODENo SMS yet.
  • STATUS_WAIT_RETRY:482913Waiting for another code; the last one is shown.
  • STATUS_CANCELCanceled or refunded.
  • NO_ACTIVATIONUnknown id.

Cancel, retry or finish action=setStatus

status=8 cancels a number without a code (full refund), status=3 asks for another code on the same number, status=6 finishes it.

ParameterRequiredDescription
idyesThe id from getNumber
statusyes8, 3 or 6
Answer
ACCESS_CANCEL
  • EARLY_CANCEL_DENIEDA code has already arrived; finish instead of cancel.
  • ACCESS_RETRY_GETWaiting for another code.
  • ACCESS_ACTIVATIONFinished.

Private number prices action=getRentPrices

Price for the whole period by country and period. Returns JSON.

ParameterRequiredDescription
countrynoTwo-letter country code
Answer
{"us":{"sixMonths":35.99,"twelveMonths":59.99}}

Buy a private number action=getRentNumber

Buys a private number for a period. Returns JSON.

ParameterRequiredDescription
countryyesTwo-letter country code
periodyesoneMonth, threeMonths, sixMonths, twelveMonths, twoYears or threeYears
Answer
{"status":"success","id":"N-3HV8QZ2K5M","phone":"14155550123","until":"2027-05-02T10:00:00.000Z"}
  • BAD_PERIODThe period is not sold for this country.
  • NO_BALANCENot enough credit.

Read private number SMS action=getRentStatus

All SMS received by the private number so far. Returns JSON.

ParameterRequiredDescription
idyesThe id from getRentNumber
Answer
{"status":"success","state":"active","messages":[{"code":"482913","text":"Your code is 482913","from":"Telegram","at":"..."}]}

Cancel a private number action=setRentStatus

status=2 cancels a private number for a full refund while no SMS arrived and it is less than 20 minutes old.

ParameterRequiredDescription
idyesThe id from getRentNumber
statusyes2
Answer
{"status":"success"}
  • EARLY_CANCEL_DENIEDAn SMS arrived or 20 minutes passed.
SMS Verification API: Get OTP Numbers by HTTP | SNSCodes