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
} '
ParameterDescription
numberPhone number in e.164 format
The field must not contain Cyrillic characters
code4-digit code
timeoutMaximum 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

errorCodeerrorReasonDescription
1 НТТP 401Authentication requiredInvalid authentication token
2 HTTP 400Inactive accountInactive account. Contact support
4 HTTP 429Too many requestsToo many requests in a short period
5 HTTP 401Inactive tokenInactive token
6 HTTP 403Insufficient fundsLow balance, unable to process the request
10 HTTP 400Invalid requestMalformed request
11 HTTP 400Invalid numberInvalid number format. The number must be in E.164 format
16 HTTP 400Sender not allowedSender ID is not allowed for this type of request

Retrieving statuses

Status retrieval must be configured via Callback.

Callback parameters

ParameterDescription
requestIdUnique request identifier on the partner’s side
numberSubscriber’s phone number
statusStatus (see table below)
timestampStatus change time in unixtime format
appKeyApplication API key

Status mapping

Partner StatusDescriptionCorresponding Message_state
ANSWEREDCall connected, subscriber answeredDELIVERED
TERMINATEDCall reached subscriber, but not answered (call ended due to TTL expiration or command)
BUSY_HERECall reached subscriber, but subscriber rejected the call
REJECTEDCall cannot be completed, e.g., number is busy with another call or other SIP errorUNDELIVERED
UNAVAILABLESubscriber unavailable, phone is off
FORBIDDENReturned when anti-fraud protection is triggered
On this page