FlashingCall (VoiceCode)#
FlashingCall (VoiceCode) Request#
To send the message with FlashingCall type, you need to make a request.
To send VoiceCode, you need to specify the FlashingCall type and send a request, containing the code. The specified code (without accompanying text) will be passed to the operator, who will insert it into the text of the message template.
1{
2"login": "YOUR_LOGIN",
3"password": "YOUR_PASSWORD",
4"destAddr": "Subscriber's_Number",
5"notifyUrl":"URL_for_sending_statuses",
6"message": {
7 "type": "FLASHINGCALL",
8 "data": {
9 "text": "1234",
10 "ttl": 1
11 }
12}
13}
Parameter |
Required |
Type |
Description |
|---|---|---|---|
login |
yes |
string |
Partner’s name in the system. |
password |
yes |
string |
Partner’s password in the system. |
destAddr |
yes |
string |
Subscriber’s phone number. More detailsIt contains the country code, operator code and phone number.
For the Russian Federation, the code can be
Examples: |
notifyUrl |
no |
string |
Hostname of the incoming API to obtain the delivery report (see Delivery Status Service). More detailsThis parameter is optional in the request, but when sending you need to consider the following:
If any of the specified conditions are not met, an error will be generated and the request will not be executed. |
message |
yes |
object |
Parameters of a message being sent. |
message/type |
yes |
enum |
Message type. The value of |
message/data |
yes |
object |
Parameters of the data being sent. |
message/data/text |
yes |
string |
Message text. The message shall contain either a 4-digit or 6-digit numeric code used to call the subscriber. More detailsBy default, a four-digit code is set for sending. To configure the sending of a six-digit code, you should contact the support of the Service Provider.
If a message is sent without a code, the request will be rejected with the error
Number of characters of the message text: no more than 2000. |
message/data/ttl |
yes |
integer |
FLASHINGCALL (Voice Code) message lifetime. More detailsThe waiting interval for a response is from 1 to 5 minutes. Note If |
FlashingCall Request Result#
VoiceCode Request Result#
FlashingCall (VoiceCode) Message Sending Errors#
For results with errors, a response HTTP code will differ from 200 (see Error Codes).
1{
2 "error": {
3 "code": 4,
4 "description": "Invalid request"
5 },
6 "extendedDescription": "FlashingCall text should contain a 4-digit code."
7}
Parameter |
Data type |
Description |
|---|---|---|
error |
object |
Error information. |
error/code |
int |
Error code. |
error/description |
string |
A brief description of the error. |
extendedDescription |
string |
Detailed description of the error (optional parameter). |
Error Codes#
Code |
Description |
HTTP-code |
|---|---|---|
1 |
Service is unavailable |
503 |
2 |
Invalid IP-address |
403 |
3 |
Too many connections |
429 |
4 |
Invalid request |
400 |
5 |
Invalid login |
401 |
6 |
Invalid password |
401 |
7 |
serviceNumber is not defined |
400 |
8 |
destAddr is not correct |
406 |
9 |
Message type is not correct |
406 |
10 |
Prohibited sending duplicates |
409 |
11 |
Invalid TTL |
406 |
100 |
100 |
500 |
FlashingCall (VoiceCode) Delivery Statuses#
To receive FlashingCall (VoiceCode) message statuses you need to set up the Delivery Status Service.
Delivery Error Codes#
Delivery error codes for each message type are provided in the corresponding tab of the Description of Error Codes section.