Everything starts from creating a Flow. A Flow is a sequence of steps that a user must complete to identify himself.
To create a Flow you need to make a POST request to the endpoint /flow with the following JSON object:
{
"callback_url": "https://your-company.com/callback",
"person_id": "your-client-id",
"locale": "en"
}The callback_url is the address to which the user will be redirected after the process is completed. The person_id is the identifier of the user in your system. The locale is the language in which the user will be shown the interface.
Here is the curl command to create a Flow:
curl -X POST https://REPLACE_WITH_API_HOSTNAME/flow \
-H 'Content-Type: application/json' \
-H 'X-Verigram-Api-Version: 2.0' \
-H 'X-Verigram-Api-Key: your-test-api-key' \
-d '{
"callback_url": "https://your-company.com/callback",
"person_id": "your-client-id",
"locale": "en"
}'You can get your test API key in the Console.
Do not use test API keys in production. The test keys has rate limits.
For production generate a production API key and secret in the console.
The response will be a JSON object with the flow_id and the vlink fields. flow_id is the unique identifier of the Flow, which you can use later to get the results of the verification process in your backend. And the vlink is the HTTP link which you can open in the browser to start the verification process.
{
"flow_id": "your-flow-id",
"vlink": "https://web.verigram.kz/hf2/your-flow-id/"
}To get the results of the Flow, you need to make a GET request to the endpoint /flow/{flow_id}/result where flow_id is the identifier of the Flow you want to check.
Here is the curl command to get the status of the Flow:
curl -X GET https://REPLACE_WITH_API_HOSTNAME/flow/your-flow-id/result \
-H 'Content-Type: application/json' \
-H 'X-Verigram-Api-Version: 2.0' \
-H 'X-Verigram-Api-Key: your-test-api-key'The response will be a JSON object with the status of the Flow in the flow_status field which will be pass if the verification was successful or fail otherwise. You can also see the details of the verification process for each service in the response.