Sms-man service API documentation

API is a protocol of interaction between your software and our activation server. The API is needed in order to automate the process of receiving SMS messages on your side To work with the API, you must use your API key, you can get it by going to the profile page. Our software is fully compatible with competitor sites

Protocol Description

  • All requests should go to http://api.sms-man.com/stubs/handler_api.php
  • POST or GET request.
  • All requests must have an API key in the form of the "api_key" parameter

Request balance:

http://api.sms-man.com/stubs/handler_api.php?action=getBalance&api_key=$api_key

Parameters

Field Type Required Value
action String yes getBalance
api_key String yes your API KEY

Result

ACCESS_BALANCE:$balance (where $balance is the account balance)

Possible errors

Error Description
BAD_KEY Invalid API Key

Request for available numbers:

http://api.sms-man.com/stubs/handler_api.php?action=getPrices&api_key=$api_key&country=$country&service=$service

Parameters

Field Type Required Value
action String yes getPrices
api_key String yes Your API KEY
country Integer no Country — display.
service String no Service — display.

Result

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

Possible errors

Error Description
BAD_KEY Invalid API Key

Request a phone number:

http://api.sms-man.com/stubs/handler_api.php?action=getNumber&api_key=$api_key&service=$service&country=$country&ref=$ref

Parameters

Field Type Required Value
action String yes getNumber
api_key String yes Your API KEY
country Integer yes Country — display.
service String yes Service — display.
ref String no Pass Referral ID — read more.

Result

ACCESS_NUMBER:$id:$number $id activation id for change activation status $number your number for selected service

Possible errors

Error Description
BAD_KEY Invalid API Key
NO_NUMBERS No numbers right now, try again later
NO_BALANCE Low balance

Get activation status:

http://api.sms-man.com/stubs/handler_api.php?action=getStatus&api_key=$api_key&id=$id

Parameters

Field Type Required Value
action String yes getStatus
api_key String yes Your API KEY
id Integer yes id активации

Result

STATUS_WAIT_CODE - waiting for sms STATUS_WAIT_RETRY:$lastcode - waiting for code refinement (where is $lastcode, inappropriate code) STATUS_WAIT_RESEND - if you selected retry sms set status to 6 STATUS_CANCEL - activation rejected STATUS_OK:$smscode - $smscode is your sms code for registration

Possible errors

Error Description
BAD_KEY Invalid API Key
NO_ACTIVATION Activation not found

Change activation status:

http://api.sms-man.com/stubs/handler_api.php?action=setStatus&api_key=$api_key&id=$id&status=$status

Parameters

Field Type Required Value
action String yes setStatus
api_key String yes Your API KEY
id Integer yes Activation ID
status Integer yes Activation status

Possible statuses:

-1 - reject activation 1 - report availability (sms has been sent) 3 - request another sms (free) 6 - complete activation (if status "sms received" - complete activation successfully, if status "waiting retry" changes activation to get a new sms code) 8 - number used or banned

Result

STATUS_WAIT_CODE - waiting for sms ACCESS_READY - activation ready ACCESS_RETRY_GET - waiting for a new sms ACCESS_ACTIVATION - service successfully activated ACCESS_CANCEL - activation rejected

Possible errors

Error Description
BAD_KEY Invalid API Key
NO_ACTIVATION Activation not found
BAD_STATUS Incorrect status

Get all countries:

http://api.sms-man.com/stubs/handler_api.php?action=getCountries&api_key=$api_key

Parameters

Field Type Required Value
action String yes getCountries
api_key String yes Your API KEY

Result

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

Possible errors

Error Description
BAD_KEY Invalid API Key

Get all services:

http://api.sms-man.com/stubs/handler_api.php?action=getServices&api_key=$api_key

Parameters

Field Type Required Value
action String yes getServices
api_key String yes Your API KEY

Result

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

Possible errors

Error Description
BAD_KEY Invalid API Key
BAD_ACTION Incorrect action
  Код Название
Error

Service temporarily unavailable. Try other country.