Number verification history
This method returns the PIN verification history for the provided phone number.
Resource
https://api.infobip.com/2fa/1/applications/:applicationId/verifications
Parameters
| Property name | Type | Description |
|---|---|---|
| applicationId | string | 2FA application ID. |
| MSISDN | string | Filter by phone number (MSISDN). |
| verified | boolean | Filter by verified (true or false). |
| sent | boolean | Filter by message sent status (true or false). |
Request Example
GET /2fa/1/applications/BCA580B57F088A7DACD7D0BFA97E8479/verifications?msisdn="41793026727" HTTP/1.1
Host: api.infobip.com
Authorization: App 003026bbc133714df1834b8638bb496e-8f4b3d9a-e931-478d-a994-28a725159ab9
Content-Type: application/json
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.infobip.com/2fa/1/applications/BCA580B57F088A7DACD7D0BFA97E8479/verifications?msisdn=%2241793026727%22",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: App 003026bbc133714df1834b8638bb496e-8f4b3d9a-e931-478d-a994-28a725159ab9",
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Response
[
{
"msisdn": "41793026727",
"verified": true,
"verifiedAt": 1418364366,
"sentAt": 1418364246
}
]
Response format
If successful, the response header HTTP status code will be 200 OK and the body will contain the array of verification statuses.
If you try to get PIN statuses without authorization, you will receive the error 401 Unauthorized.
Check verification status response
| Parameter | Type | Description |
|---|---|---|
| msisdn | String | Phone number (MSISDN) for which verification status is checked. |
| verified | Boolean | Indicates if the phone number (MSISDN) is already verified for 2FA application with given ID. |
| verifiedAt | Long | Verification UNIX timestamp (in millis), if the phone number (MSISDN) is verified. |
| sentAt | Long | Sent UNIX timestamp (in millis), if the phone number (MSISDN) is verified. |