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.com/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.com/control/get-balance?token=$tokenParameters
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.com/control/limits?token=$token&country_id=$country_id&application_id=$application_idParameters
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.com/control/get-number?token=$token&country_id=$country_id&application_id=$application_idParameters
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.com/control/get-sms?token=$token&request_id=$request_idParameters
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.com/control/set-status?token=$token&request_id=$request_id&status=$statusParameters
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"}
Request for available numbers:
http://api.sms-man.com/control/get-prices?token=$token&country=$countryПараметры
token | String | yes | Your API KEY |
country_id | Integer | no | Country — display |
Результат
{"0":{"1":{"cost":"15","count":6455},"2":{"cost":"50","count":124}}, "1":{"3":{"cost":"6","count":1000}}
Possible errors
{"success":false,"error_code":"wrong_token","error_msg": {"token": "Wrong token!"}}
Get all countries:
http://api.sms-man.com/control/countries?token=$tokenParameters
Field | Type | Required | Value |
---|---|---|---|
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.com/control/applications?token=$tokenParameters
Field | Type | Required | Value |
---|---|---|---|
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!"}