For developers

This is the section with API documentation for connecting your service to SMS-Man and automatic number purchasing.

Compatible API

API is the protocol of interaction between your software and our activation server. API is needed to automate sms receipt process on your side To work with API you have to use your API key, you can get it in your profile section, passing simple registration procedure. Our API is fully compatible with competitor websites.

API Protocol Description

All requests must go to https://api.sms-man.com/stubs/handler_api.php POST or GET request. All requests must contain the API key in the form of the parameter api_key. All answers in json format


Balance request

Parameters

Parameter
Type
Required
Value
actionStringYesgetBalance
api_keyStringYesYour API key

Result

  • ACCESS_BALANCE:$balance (where $balance is the balance of your account)

Possible errors

Error
Description
BAD_KEYIncorrect API key

Get current prices

Parameters

Parameter
Type
Required
Value
actionStringYesgetPrices
api_keyStringYesYour API key
countryNumberNo
serviceStringNo

Result

{
  "0": {"vk":{"cost":"15","count":6455},"wb":{"cost":"50","count":124}},
  "1": {"fb":{"cost":"6","count":1000}}
}

Possible errors

Error
Description
BAD_KEYIncorrect API key

Get number

Parameters

Parameter
Type
Required
Value
actionStringYesgetNumber
api_keyStringYesYour API key
countryNumberYes
serviceStringYes
maxPriceNumberNoyour desired value
currencyStringNoRUB/USD/EUR
refStringNoPass the referral ID

Result

  • ACCESS_NUMBER:$id:$number
  • $id - activation id
  • $number - phone number

Possible errors

Error
Description
BAD_KEYIncorrect API key
NO_NUMBERSNo numbers, try again later
NO_BALANCELow balance

Get activation status

Parameters

Parameter
Type
Required
Value
actionStringYesgetStatus
api_keyStringYesYour API key
idNumberYesActivation id

Result

  • STATUS_WAIT_CODE - pending sms
  • STATUS_WAIT_RETRY:$lastcode - waiting for code refinement (where $lastcode - last, failed code)
  • STATUS_WAIT_RESEND — waiting for the resend of an SMS (the software should press resend the SMS and perform a change of status to 6)
  • STATUS_CANCEL — the activation is cancelled
  • STATUS_OK:$code — code received (where $code is the activation code)

Possible errors

Error
Description
BAD_KEYIncorrect API key
NO_ACTIVATIONThere is no activation

Get activation status V2

Parameters

Parameter
Type
Required
Value
actionStringYesgetStatusV2
api_keyStringYesYour API key
idNumberYesActivation id

Result

{
  "verificationType": 0,
  "sms": {"dateTime":"0000-00-00 00:00:00","code":"code","text":"sms text"}
}

STATUS_CANCEL

STATUS_WAIT_CODE

Possible errors

Error
Description
BAD_KEYIncorrect API key
NO_ACTIVATIONThere is no activation

Change the activation status

Parameters

Parameter
Type
Required
Value
actionStringYessetStatus
api_keyStringYesYour API key
idNumberYesActivation id
statusNumberYesActivation status

Possible statuses

  • -1 — Cancel activation
  • 1 — Notify that SMS is sent (optional)
  • 3 — Request another code
  • 6 — complete the activation (if the status was "code received" - marks success and completes, if the status was "preparation" - deletes and marks error, if the status was "waiting for repeat" - switches activation to waiting for SMS)
  • 8 — informs that the number is used and cancels activation

Result

  • ACCESS_READY - number readiness is confirmed
  • ACCESS_RETRY_GET - waiting for a new sms
  • ACCESS_ACTIVATION - the service is successfully activated
  • ACCESS_CANCEL - activation is cancelled
  • EARLY_CANCEL_DENIED - it is not allowed to cancel a number within first 2 minutes

Possible errors

Error
Description
BAD_KEYIncorrect API key
NO_ACTIVATIONActivation ID does not exist
BAD_STATUSIncorrect status

Get list of all countries

Parameters

Parameter
Type
Required
Value
actionStringYesgetCountries
api_keyStringYesYour API key

Result

[
  {"id":0,"name":"Россия","name_en":"Russia"},
  {"id":3,"name":"Китай","name_en":"China"}
]

Possible errors

Error
Description
BAD_KEYIncorrect API key

Get list of all services

Parameters

Parameter
Type
Required
Value
actionStringYesgetServices
api_keyStringYesYour API key

Result

[
  {"id":"vk","name":"Вконтакте"},
  {"id":"wb","name":"WeChat"},
  {"id":"tg","name":"Telegram"}
]

Possible errors

Error
Description
BAD_KEYIncorrect API key
BAD_ACTIONIncorrect action