FlashСall API
Flash Call is a modern authentication technology that uses an incoming call to verify the user’s identity. Unlike standard SMS codes, Flash Call allows for a faster and more convenient verification process.
FlashCall requests
Request:
POST https://api.unibell.ru/apps/flash/calls/flash?X-Authorization=AccessKey d8ac9959r12b43545XXXXX
Parameters are passed in the request body:
{
"number": "XXXXXXXXXXXX",
"code": 1234,
"timeout": 60000
}
Example requests using CURL:
curl --location 'https://api.unibell.ru/apps/flash/calls/flash?X-Authorization=AccessKey%20d8ac9959r12b43545XXXXX' \
--header 'Content-Type: application/json' \
--data '{
"number": "XXXXXXXXXXXX",
"code": 1234,
"timeout": 60000
} '
curl --location 'https://api.unibell.ru/apps/flash/calls/flash' \
--header 'X-Authorization: AccessKey d8ac9959r12b43545XXXXX' \
--header 'Content-Type: application/json' \
--data '{
"number": "XXXXXXXXXXXX",
"code": 1234,
"timeout": 60000
} '
| Parameter | Description |
|---|---|
| number | Phone number in e.164 format The field must not contain Cyrillic characters |
| code | 4-digit code |
| timeout | Maximum call duration in milliseconds |
Response:
In case of successful sending, a requestId is returned – the message identifier on the partner’s side, which is later returned in the callback.
Example of a successful response:
{
"requestId": XXXXXX
"from": "XXXXXXXXXXXX"
}
Example of an unsuccessful response:
{
"errorCode" : 1,
"errorReason" : "Authentication required"
}
Error code descriptions
| errorCode | errorReason | Description |
|---|---|---|
| 1 НТТP 401 | Authentication required | Invalid authentication token |
| 2 HTTP 400 | Inactive account | Inactive account. Contact support |
| 4 HTTP 429 | Too many requests | Too many requests in a short period |
| 5 HTTP 401 | Inactive token | Inactive token |
| 6 HTTP 403 | Insufficient funds | Low balance, unable to process the request |
| 10 HTTP 400 | Invalid request | Malformed request |
| 11 HTTP 400 | Invalid number | Invalid number format. The number must be in E.164 format |
| 16 HTTP 400 | Sender not allowed | Sender ID is not allowed for this type of request |
Retrieving statuses
Status retrieval must be configured via Callback.
Callback parameters
| Parameter | Description |
|---|---|
| requestId | Unique request identifier on the partner’s side |
| number | Subscriber’s phone number |
| status | Status (see table below) |
| timestamp | Status change time in unixtime format |
| appKey | Application API key |
Status mapping
| Partner Status | Description | Corresponding Message_state |
|---|---|---|
| ANSWERED | Call connected, subscriber answered | DELIVERED |
| TERMINATED | Call reached subscriber, but not answered (call ended due to TTL expiration or command) | |
| BUSY_HERE | Call reached subscriber, but subscriber rejected the call | |
| REJECTED | Call cannot be completed, e.g., number is busy with another call or other SIP error | UNDELIVERED |
| UNAVAILABLE | Subscriber unavailable, phone is off | |
| FORBIDDEN | Returned when anti-fraud protection is triggered |
On this page