Skip to content

Get Status

You are viewing V1 (legacy) docs

New integrations should use the flow based Verify API V2. Go to latest version

For checking the Verification status

GET
/verify/v1/report/{otp_id}


POSTMAN

Authentication

AUTHORIZATIONS: Bearer Token

Request parameters

Parameter Value / Pattern Example(s)
*otp_id the otp_id which was returned from Generate OTP endpoint 8d963dbf-d655-4fe6-9157-48885a036050

Response

When the request is validated the status will be returned.

200 - Success
{
    "status": "OPEN"
}
404 - Not Found
{
    "detail": {
        "code": "MESSAGE_LOG_NOT_EXISTS",
        "message": "Given message otp id not exists in the system. Please Try Again!"
    }
}
422- Validation Error
{
    "detail": [
        {
            "loc": [
                "string",
                0
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Programming Examples

curl --location -g --request GET 'https://api.d7networks.com/verify/v1/report/{{otp_id}}' \
--header 'Authorization: Bearer {{api_access_token}}'
npm i direct7
1
2
3
4
5
const Client = require('direct7')
const client = new Client(apiToken="Your API token")
# otp_id is the id returned in the response of send_otp
const response = await client.verify.getStatus({otp_id: "d4c6b4e9-532d-4be7-9e9e-897f97847fbd"});
console.log(response);
pip install direct7
1
2
3
4
5
6
from direct7 import Client

client = Client(api_token="Your API token")

# otp_id is the id returned in the response of send_otp
client.verify.get_status(otp_id="0012c7f5-2ba5-49db-8901-4ee9be6dc8d1")

composer require direct7/direct7-php
require_once 'vendor/autoload.php';
1
2
3
4
5
6
7
8
require_once __DIR__ . '/vendor/autoload.php';

use direct7\Direct7\Client;

$client = new Client(api_token="Your API token")

$response = $direct7->verify->getStatus(otpId:'31b89954-d37c-426f-8113-ac718afc5d4c');
var_dump($response);
go get -u github.com/d7networks/direct7-go-sdk
1
2
3
4
5
6
7
8
import (
"github.com/d7networks/direct7-go-sdk/direct7"
)   
apiToken := "Your Api Token"
client := direct7.NewClient(apiToken)
verify := direct7.NewVerify(client)
requestID := "001ff613-de30-4f82-81f6-1fe944b8f61b"
statusResponse, err := verify.GetStatus(requestID)
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.d7networks.com/verify/v1/report/{{otp_id}}")
.method("GET", body)
.addHeader("Authorization", "Bearer {{api_access_token}}")
.build();
Response response = client.newCall(request).execute();
var headers = {
'Authorization': 'Bearer {{api_access_token}}'
};
var request = http.Request('GET', Uri.parse('https://api.d7networks.com/verify/v1/report/{{otp_id}}'));

request.headers.addAll(headers);

http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}
1
2
3
4
5
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", "Bearer {{api_access_token}}")

$response = Invoke-RestMethod 'https://api.d7networks.com/verify/v1/report/{{otp_id}}' -Method 'GET' -Headers $headers
$response | ConvertTo-Json
gem install direct7
1
2
3
4
5
6
require 'direct7'

client = Direct7::Client.new('Your API token')

# otp_id is the id returned in the response of send_otp
client.verify.get_status(otp_id="0012c7f5-2ba5-49db-8901-4ee9be6dc8d1")