Create new liveness session
Create new liveness session. Pass the returned JSON object to the frontend (web, android or ios libraries) so you can initialize and start the session.
curl -X POST "https://demo.verigram.kz/liveness2/session" \
-H "X-Verigram-Api-Key: $IDENTIFICATION_SAAS_API_KEY" \
-H "X-Verigram-Api-Version: 2.0.0" \
-H "Content-Type: application/json" \
-d '{
"person_id": "string",
"pipeline": [
[
"zoom-in"
],
[
"zoom-out"
],
[
"turn-left",
"turn-right"
]
]
}'Авторизация
X-Verigram-Api-KeystringheaderобязательноAPI key in the X-Verigram-Api-Key header
Параметры
X-Verigram-Api-VersionstringheaderобязательноRequired API version header.
Значение по умолчанию:2.0.0
Тело
person_idstringобязательноIdentifier of a person associated with the session. Alphanumeric string.
durationintegerDuration of an access token generated for the session (in seconds)
flow_idstringFlow ID to be used for the session
pipelinearray[]A list of actions to be performed by the liveness verification process.
platformenum<string>A platform of a device where the session is going to be executed.
Одно из:webandroidiosmax_retriesintegerMaximum number of retries for a session.
Значение по умолчанию:3
Ответ
An object with session id and other info representing a Liveness2 session, that need to be passed to the frontend.
access_tokenstring<uuid>A token to be used in the frontend to authenticate the user
session_idstringThe identifier of the newly created session
person_idstringThe identifier of the person associated with the session
flow_idstringThe identifier of the flow associated with the session. Is generated automatically by the system if not passed when creating the session.
created_atstring<date-time>attempts_leftintegerThe number of attempts left for the session
{
"access_token": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"session_id": "string",
"person_id": "string",
"flow_id": "string",
"created_at": "2026-01-15T09:30:00Z",
"attempts_left": 0
}