API — this is the protocol of interaction between your software and our activation server. The API is needed to automate the process of receiving SMS messages on your side
Our API is compatible with the sms-activate API
All requests must have an API key in the form of the api_key parameter
&action=getNumber
$api_key — your API key (Settings);
$service — service code;
$country — country code.
If not specified, the Russian number will be selected by default.
Possible errors:
BAD_KEY — check your API key;
NO_NUMBERS — repeat a request or choose another country.
the number has not been issued — repeat the request or select another country
The example of successful answer:
ACCESS_NUMBER:38496653:66846426435
Where 38496653 is activation id. 66846426435 is a phone number.
https://api.grizzlysms.com/stubs/handler_api.php?api_key=$api_key&action=setStatus&status=$status&id=$id
&action=setStatus
$api_key — your API key (Settings);
$id — activation id;
$status — activation status:
-1 — cancel activation
1 — inform about the readiness of the number (sms sent to the number);
3 — wait for the next code on the same number;
6 — complete activation;
8 — cancel activation.
Service responses:
ACCESS_READY — the availability of the number has been confirmed
ACCESS_RETRY_GET — waiting for a new sms
ACCESS_ACTIVATION — the service has been activated successfully
ACCESS_CANCEL — activation canceled
Possible errors:
ERROR_SQL — SQL server error
NO_ACTIVATION — the activation id does not exist
BAD_SERVICE — incorrect service name
BAD_STATUS — incorrect status
BAD_KEY — Invalid API key
BAD_ACTION — incorrect action
https://api.grizzlysms.com/stubs/handler_api.php?api_key=$api_key&action=getStatus&id=$id
&action=getStatus
$api_key — your API key (Settings);
$id — activation id.
Service responses:
STATUS_WAIT_CODE — waiting for sms
STATUS_WAIT_RETRY:$lastcode — waiting for code refinement (where $lastcode is the last, unsuitable code)
STATUS_WAIT_RESEND — waiting for the sms to be sent again (the software must click re-send sms and perform a status change to 6)
STATUS_CANCEL — activation canceled
STATUS_OK:$code — code received (where $code is the activation code).
Possible errors:
NO_ACTIVATION — the activation id does not exist
BAD_KEY — Invalid API key
BAD_ACTION — incorrect action
&action=getBalance
$api_key — your API key (Settings);
Service response:
ACCESS_BALANCE:$balance (where $balance is the account balance)
Possible errors:
BAD_KEY — Invalid API key
&action=getPrices
$api_key — your API key (Settings);
$service — service code;
$country — country code.
Service responses in the format
For example, a request of the form https://api.grizzlysms.com/stubs/handler_api.php?api_key=YOURKEY&action=getPrices&country=0
{ "Country": { "Service": { "cost": Cost, "count": Quantity } } }
https://api.grizzlysms.com/stubs/handler_api.php?api_key=$api_key&action=getRentNumber&service=$service&country=$country&rent_time=$time
$api_key – your API-key (Settings);
$service – service code;
$country – country code;
$time – rental time (min. of 4 hours).
Service response will be in json format:
{ "status": "status", "phone": { "id": ”id rent”, “endDate”: ”rent expiration date”, “number”:”phone number” } }
The example of successful answer:
{ "status": "success", "phone": { "id": ”38496653”, “endDate”: ”2023-12-31T19:30:52”, “number”: ”66846426435” } }
Example of an answer with an error:
{ "status": "error", "error": "BAD_KEY" }
Possible errors:
BAD_KEY – check your API-key;
BAD_COUNTRY – check country code;
BAD_SERVICE – check service code;
INVALID_TIME – check count hours;
NO_BALANCE – insufficient funds in the account;
NO_NUMBERS – repeat a request or choose another country;
SERVER_ERROR – server error, repeat request later.
$api_key – your API-key (Settings);
$time - rental time (min. of 4 hours).
Service response will be in json format:
{ "status": "status", "phone": { "id": "id rent", "endDate": "rent expiration date", "number": "phone number" } }
The example of successful answer:
{ "status": "success", "phone": { "id": "38496653", "endDate": "2023-12-31T19:30:52", "number": "66846426435" } }
Example of an answer with an error:
{ "status": "error", "error":"BAD_KEY" }
Possible errors:
BAD_KEY – check your API-key;
INVALID_TIME – check count hours;
NO_ID_RENT – check id rent;
NO_BALANCE – insufficient funds in the account;
RENT_DIE – this number is no longer available, select a new number;
SERVER_ERROR – server error, repeat request later.
$api_key – your API-key (Settings);
$id – id rent;
Service response will be in json format:
{ "status": "status", "quantity": "number of times rented", "values": { “1”: { “date”: ”rent commencement date”, “price”: rentalCost, “hours”:rentDuration } }
The example of successful answer:
{ "status": "success", "quantity": ”2”, "values": { “1”: { “date”: ”2023-10-26 11:03:39”, “price”: 3.6, “hours”: 4 }, “2”: { “date”:” 2023-10-25 11:02:31”, “price”: 4, “hours”: 5 } } }
An example of a successful response with an empty number:
{ "status": "success", "values": {} }
Example of an answer with an error:
{ "status": "error", "error": "SQL_ERROR" }
Possible errors:
BAD_KEY – check your API-key;
NO_ID_RENT – check id rent;
SQL_ERROR – SQL server error, repeat request later.
$api_key – your API-key (Settings);
$id – id rent;
$status – rent status:
1 – finish rent;
2 – cancel rent.
Service response will be in json format:
{ "status": "статус" }
The example of successful answer:
{ "status": "success" }
Example of an answer with an error:
{ "status": "error", "error": "CANT_CANCEL" }
Possible errors:
BAD_KEY – check your API-key;
NO_ID_RENT – check id rent;
INVALID_PHONE – id rent nonexistent;
INCORECT_STATUS – check rent status;
ALREADY_FINISH – rent has already been finalized;
ALREADY_CANCEL – rent has already been canceled;
CANT_CANCEL – cannot be canceled (SMS received or 20 minutes have passed);
SQL_ERROR – SQL server error, repeat request later;
SERVER_ERROR – server error, repeat request later.
$api_key – your API-key (Settings);
$id – id rent.
Service response will be in json format:
{ "status": "status", "quantity": "number of codes", "values": { "0": { "phoneFrom": "phone number", "service": "service code", "text": "sms code", "date": "date of SMS receipt" } } }
The example of successful answer:
{ "status": "success", "quantity": "2 ", "values": { "0 ": { "phoneFrom": "66846426435", "service": "tg", "test": "123456", "date": "2023-10-26 11:03:39" }, "1": { "phoneFrom ": "66846426435", "service": "tg", "test": "224444", "date": "2023-10-26 11:02:31" } } }
Example of a successful response with an empty list of codes:
{ "status": "success", "values":{} }
Example of an answer with an error:
{ "status": "error", "error": "NO_ID_RENT" }
Possible errors:
BAD_KEY – check your API-key;
NO_ID_RENT – check id rent;
INVALID_PHONE – id rent nonexistent;
SERVER_ERROR – server error, repeat request later.
$api_key – your API-key (Settings);
$service – service code;
$country – country code;
$time - rental time (min. of 4 hours).
Service response will be in json format:
{ "status": "status", "values": { "Country": { "Service": { "cost": cost, "count": number, "max_hours": maximumRentalHours } } } }
The example of successful answer:
{ "status": "success", "values": { "0": { "tg": { "cost": 12, "max_hours": 10, "count": 15 } } } }
Example of an answer with an error:
{ "status": "error", "error": "INVALID_TIME" }
Possible errors:
BAD_KEY – check your API-key;
BAD_COUNTRY – check country code;
BAD_SERVICE – check service code;
INVALID_TIME – check count hours;
NO_NUMBERS – repeat a request or choose another country;
SERVER_ERROR – server error, repeat request later.