Sms-man service Rent API documentation

API is a protocol of interaction between your software and our activation server.

Protocol Description

  • All requests should go to http://api.sms-man.ru/rent-api/
  • GET requests only
  • All requests must have an API key in the form of the "token" parameter
  • Response format: json

Get balance:

http://api.sms-man.ru/rent-api/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": {"token": "Wrong token!"}}

Get available countries for rent:

http://api.sms-man.ru/rent-api/limits?token=$token&country_id=$country_id&type=$type&time=$time

Parameters

Field Type Required Value
token String yes Your API KEY
country_id Integer no Country — display
type String yes
time Integer yes Время аренды

Result

{"type":"hour","time":"4","limits":[{"country_id":"1","count":"127","cost":"151.68"},{"country_id":"2","count":"49","cost":"113.56"},{"country_id":"4","count":"0","cost":"151.68"}]}

Possible errors

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

Get number for rent:

http://api.sms-man.ru/rent-api/get-number?token=$token&country_id=$country_id&type=$type&time=$time

Parameters

Field Type Required Value
token String yes Your API KEY
country_id Integer yes Country — display
type String yes
time Integer yes Rent time

Result

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

Possible errors

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

Change request status:

http://api.sms-man.ru/rent-api/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": {"token": "Wrong token!"}}

Get latest sms:

http://api.sms-man.ru/rent-api/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":"10","country_id":1,"number":"79633002801","sms": {"message":"message", "code": "code", "time": "2020-12-12 14:50:31"}}

Possible errors

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

Get all sms:

http://api.sms-man.ru/rent-api/get-all-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":"10","country_id":1,"number":"79633002801","sms": [{"message":"message", "code": "code", "time": "2020-12-12 14:50:31"}]}

Possible errors

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

Get all requested numbers:

http://api.sms-man.ru/rent-api/get-all-requests?token=$token

Parameters

Field Type Required Value
token String yes Your API KEY

Result

[{"id":1,"country_id":1,"number":"79002415539","status":"cancel"}]

Possible errors

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

Service temporarily unavailable. Try other country.