Sms-man service API v2 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.ru/control/
  • POST or GET request.
  • All requests must have an API key in the form of the "token" parameter

Request balance:

http://api.sms-man.ru/control/get-balance?token=$token

Parameters

Field Type Required Value
token String yes Your API KEY

Result

{"balance":"799.70"}

Possible errors

{"success":false,"error_code":"wrong_token","error_msg": "Wrong token!"}

Get limits:

http://api.sms-man.ru/control/limits?token=$token&country_id=$country_id&application_id=$application_id

Parameters

Field Type Required Value
token String yes Your API KEY
country_id Integer no Country — display
application_id Integer no Service — display

Result

[{"application_id":"1","country_id":"1","numbers":"32302"},{"application_id":"1","country_id":"2","numbers":"3494"}]

Possible errors

{"success":false,"error_code":"wrong_token","error_msg": {"token": "Wrong token!"}}

Request a phone number:

http://api.sms-man.ru/control/get-number?token=$token&country_id=$country_id&application_id=$application_id

Parameters

Field Type Required Value
token String yes Your API KEY
country_id Integer no Country — display
application_id Integer no Service — display
ref String no Pass Referral ID — read more.

Result

{"request_id":1,"country_id":1,"application_id":1,"number":"79002415539"}

Possible errors

{"success":false,"error_code":"wrong_token","error_msg": {"token": "Wrong token!"}}

Get sms:

http://api.sms-man.ru/control/get-sms?token=$token&request_id=$request_id

Parameters

Field Type Required Value
token String yes Your API KEY
request_id Integer yes Request ID

Result

{"request_id":1,"country_id":1,"application_id":1,"number":"79002415539", "sms_code" => "1243"}

Possible errors

{"request_id":1,"country_id":1,"application_id":1,"number":"79002415539", "error_code" => "wait_sms", "error_msg" => "Still waiting..."}

Change request status:

http://api.sms-man.ru/control/set-status?token=$token&request_id=$request_id&status=$status

Parameters

Field Type Required Value
token String yes Your API KEY
request_id Integer yes Request ID
status String yes

Result

{"request_id": 1, "success": true}

Possible errors

{"success":false,"error_code":"wrong_token","error_msg": "Wrong token!"} {"success":false,"error_code":"wrong_status","error_msg": "Status $status does not exists"}

Get all countries:

http://api.sms-man.ru/control/countries?token=$token

Parameters

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

Result

[{'id':0,'title':"Russia"}, {'id':3,'title':"China"}]

Possible errors

{"success":false,"error_code":"wrong_token","error_msg": "Wrong token!"}

Get all services:

http://api.sms-man.ru/control/applications?token=$token

Parameters

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

Result

[{'id':'1','name':"Вконтакте", "code" => "vk"}, {'id':'2','name':"WeChat", "code" => "wb"}, {'id':'3','name':"Telegram", "code" => "tg"}]

Possible errors

{"success":false,"error_code":"wrong_token","error_msg": "Wrong token!"}
  Код Название
Error

Service temporarily unavailable. Try other country.