Verify API

Two factor authentication (2FA) via SMS

Verify DecisionTelecom API allows you to verify your mobile phone number using two-factor authentication. Create a new Verify object via the API to start the recipient verification process. DecisionTelecom will take care of generating the token and ensuring that the message is delivered to the recipient.

The Verify API uses HTTPS with an access key that is used as the API authorization. Request and response payloads are formatted as JSON using UTF-8 encoding and URL-encoded values.

API Authorization - Basic Access Key Base64.

Please contact your account manager to get API key.

Send Verification

string https://web.it-decision.com/v1/api/two-factor-auth
{
    "phone":380776557788,
    "pin_length":4,
    "template_id":0,
    "country_iso":"en"
}

Response:

{
    "id": 34234234,
    "phone": 380776557788,
    "href": "https://web.it-decision.com/api/get-pin?id=34234234",
    "status": "ACCEPTD"
}

Parameters:

Id string - a unique random identifier that is generated on the DecisionTelecom platform. - Required.

phone int - the phone number where you would like to make a request. - Required.

pin_lenght int - PIN code length, from 4 to 10 digits. - Optional, by default 4.

templete_id int - default 0 (template message text: your verification code: \d{4,10}) - Required.

country_iso string - Optional, by default «en».

Check PIN code

 https://web.it-decision.com/v1/api/get-pin?id=34234234

Response:

{
    "id": 34234234,
    "phone": 380776557788,
    "pin": 4323
}

All you have to do is to check the pin code value that the user enters during verification and pin code value that we return to you in the response. If they match, then the verification was successful.

Verify examples

curl --location --request POST 'https://web.it-decision.com/v1/api/two-factor-auth' \
--header 'Authorization: Basic api key' \
--header 'Content-Type: application/json' \
--data-raw '{"phone":380631211121,"pin_length":10,"template_id":0,"country_iso":"en"}'

Last updated