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
https://api.sms-man.com/stubs/handler_api.php?action=getBalance&api_key=$api_key
Parameters
Parameter |
Type |
Required |
Value |
action |
String |
Yes |
getBalance |
api_key |
String |
Yes |
Your API key |
Result
ACCESS_BALANCE:$balance (where $balance is the balance of your account)
Possible errors
Error |
Description |
BAD_KEY |
Incorrect API key |
Get current prices
https://api.sms-man.com/stubs/handler_api.php?action=getPrices&api_key=$api_key&country=$country&service=$service
Parameters
Parameter |
Type |
Required |
Value |
action |
String |
Yes |
getPrices |
api_key |
String |
Yes |
Your API key |
country |
Number |
No |
Number country |
service |
String |
No |
Number Service |
Result
{"0":{"vk":{"cost":"15","count":6455},"wb":{"cost":"50","count":124}}
"1":{"fb":{"cost":"6","count":1000}}
Possible errors
Error |
Description |
BAD_KEY |
Incorrect API key |
Get number
https://api.sms-man.com/stubs/handler_api.php?action=getNumber&api_key=$api_key&service=$service&country=$country&ref=$ref
Parameters
Parameter |
Type |
Required |
Value |
action |
String |
Yes |
getNumber |
api_key |
String |
Yes |
Your API key |
country |
Number |
Yes |
Number country |
service |
String |
Yes |
Number Service |
ref |
String |
No |
Pass the referral ID |
Result
ACCESS_NUMBER:$id:$number
$id - activation id
$number - phone number
Possible errors
Error |
Description |
BAD_KEY |
Incorrect API key |
NO_NUMBERS |
No numbers, try again later |
NO_BALANCE |
Low balance |
Get activation status
https://api.sms-man.com/stubs/handler_api.php?action=getStatus&api_key=$api_key&id=$id
Parameters
Parameter |
Type |
Required |
Value |
action |
String |
Yes |
getNumber |
api_key |
String |
Yes |
Your API key |
id |
Number |
Yes |
Activation id |
Result
STATUS_WAIT_CODE - pending sms
STATUS_WAIT_RETRY:$lastcode - waiting for code refinement (where - 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_KEY |
Incorrect API key |
NO_ACTIVATION |
There is no activation |
Change the activation status
https://api.sms-man.com/stubs/handler_api.php?action=setStatus&api_key=$api_key&id=$id&status=$status
Parameters
Parameter |
Type |
Required |
Value |
action |
String |
Yes |
setStatus |
api_key |
String |
Yes |
Your API key |
id |
Number |
Yes |
Activation id |
status |
Number |
Yes |
Activation status |
Possible statuses
-1 — Cancel activation
1 — Notify that SMS is sent (optional)
3 — Request another code (free)
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" - translates 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
Possible errors
Error |
Description |
BAD_KEY |
Incorrect API key |
NO_ACTIVATION |
Activation ID does not exist |
BAD_STATUS |
There is no activation |
Get list of all countries
https://api.sms-man.com/stubs/handler_api.php?action=getCountries&api_key=$api_key
Parameters
Parameter |
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 |
Incorrect API key |
Get list of all services
https://api.sms-man.com/stubs/handler_api.php?action=getServices&api_key=$api_key
Parameters
Parameter |
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 |
Incorrect API key |
BAD_ACTION |
Incorrect action |