Liveness Check Proxy API
Liveness Check Proxy provides a RESTful API which is used for interacting with the service. The RESTful API consists of following API resource groups:
- The Liveness Check Service offer services for the liveness verification.
- The Audit Logs Reading Service offer services for the audit logs reading.
Possible Error Codes
The API may return one of the following error codes:
HTTP | Error Code | Description |
---|---|---|
400 |
ERROR_REQUEST |
Invalid request parameters. |
400 |
INITIATION_ERROR |
Could not initiate liveness verification process. |
400 |
VERIFICATION_ERROR |
Could not validate liveness of a user. |
404 |
ERROR_NOT_FOUND |
Resource not found. |
409 |
ERROR_REMOTE |
Error occurred during remote service communication. |
500 |
ERROR_GENERIC |
Unknown error occurred while processing request. |
Liveness Check Service
The liveness check verification flow consists of two steps, which vary slightly depending on the selected verification provider.
For the iProov verification provider, the initiation step generates a verification token, which must be passed to the iProov SDK. The iProov SDK is responsible for capturing face image of a user and transmitting it to the backend services. Once the iProov SDK completes its operations, you can proceed to the verification step to obtain the final liveness verification result.
For the Innovatrics verification provider, the initiation step is not required. The verification step requires a serialized face image captured by Innovatrics SDK to evaluate liveness and obtain the verification result.
post /liveness/init Initiate Liveness Verification
Initiate liveness verification of a specified user.
Request
{
"userId": "user1"
}
Request Params
Parameter | Type | Description |
---|---|---|
userId * |
String |
Identifier of the user for whom the verification process will be initiated. |
Response
The content of the response varies depending on the selected verification provider:
- For iProov, the initiation type is
TOKEN
. The verification token is included in thereference
parameter. - For Innovatrics, the initiation type is
NONE
and thereference
parameter is empty.
{
"initiationType": "TOKEN",
"reference": "46a0c1fba98b9a1cae88353ae8279503"
}
Parameter | Type | Description |
---|---|---|
initiationType * |
String |
Type of the initiation made. One of: TOKEN , NONE . |
reference |
String |
If using iProov provider, this contains the verification token. |
This type of error response may occur when no reference face image is available for the user, or if the verification provider could not complete the initiation process.
{
"status": "ERROR",
"responseObject": {
"code": "INITIATION_ERROR",
"message": "Could not initiate liveness check for the user."
}
}
This type of error response occurs when there is a communication error with remote services, such as the verification provider or the user details provider.
{
"status": "ERROR",
"responseObject": {
"code": "ERROR_REMOTE",
"message": "REST API call failed when fetching User Details."
}
}
This type of error response represents an unexpected error during initiation step.
{
"status": "ERROR",
"responseObject": {
"code": "ERROR_GENERIC",
"message": "Unknown error occurred while processing request."
}
}
post /liveness/verify Verify Liveness
Verify liveness of a specified user and obtain verification result.
When using iProov as a verification provider, this endpoint should not be called before the iProov SDK completes its operations. Avoid calling this endpoint repeatedly after obtaining the verification result.
Request
Content of the request depends on selected verification provider.
- For iProov, the
livenessRecord
must includereference
, which is the verification token generated during initiation step. - For Innovatrics, the
livenessRecord
must includeimage
, which is the serialized face image captured by Innovatrics SDK.
{
"userId": "user1",
"livenessRecord": {
"image": "c2VsZmllSW1hZ2U=",
"reference": "46a0c1fba98b9a1cae88353ae8279503"
}
}
Request Params
Parameter | Type | Description |
---|---|---|
userId * |
String |
Identifier of the user to be verified. |
livenessRecord.image |
byte[] |
Serialized face image captured by Innovatrics SDK. |
livenessRecord.reference |
String |
Reference for the verification process in external verification provider, such as verification token. |
Response
{
"result": "ACCEPTED",
"selfie": null
}
Parameter | Type | Description |
---|---|---|
result * |
String |
Verification result. One of: ACCEPTED , REJECTED . |
selfie |
String |
A base64-encoded selfie image captured by the user during verification, not included by default. |
This type of error response may occur when no reference face image is available for the user, or if the verification provider could not complete the verification process.
{
"status": "ERROR",
"responseObject": {
"code": "VERIFICATION_ERROR",
"message": "Could not verify liveness of the user."
}
}
This type of error response occurs when there is a communication error with remote services, such as the verification provider or the user details provider.
{
"status": "ERROR",
"responseObject": {
"code": "ERROR_REMOTE",
"message": "REST API call failed when fetching User Details."
}
}
This type of error response represents an unexpected error during verification step.
{
"status": "ERROR",
"responseObject": {
"code": "ERROR_GENERIC",
"message": "Unknown error occurred while processing request."
}
}
Audit Logs Reading Service
The Liveness Check Proxy logs occurrences of important events, such as liveness verification initiation, upload of the probe or reference face image, or result of the liveness verification. For the convenience of reading those events, an audit log retrieval service is available through the following REST API endpoints.
This service is only available to privileged users authorized as ADMIN
.
get /admin/audit/users/{userId} List Audit Logs
Retrieve a list of audit log records for a specified user. For performance reasons and to maintain clarity, this endpoint does not return the full details of each log entry. Parameters, such as uploaded photos, are excluded from the response.
This endpoint supports pagination to enable retrieving audit log records in manageable segments.
Request
Path Params
Param | Type | Description |
---|---|---|
userId * |
String |
ID of the user whose audit logs to retrieve. |
Query Params
Param | Type | Description |
---|---|---|
start |
Long |
Beginning of the time frame for which to retrieve the audit logs, specified as unix timestamp in milliseconds. Defaults to 30 days before the end parameter. |
end |
Long |
End of the time frame for which to retrieve the audit logs, specified as unix timestamp in milliseconds. Defaults to current timestamp. |
pageSize |
Integer |
Number of records to return in a single call for audit log list pagination. Defaults to 100. |
pageNumber |
Integer |
Page number to return for audit log list pagination. Defaults to 0. |
Response
{
"records": [
{
"id": "394a898b-26b4-4641-9f47-b4ea3488295e",
"timestamp": 1724336046394,
"message": "Received request to verify liveness from userId=user-123."
}
]
}
Attribute | Type | Description |
---|---|---|
id |
String |
The ID of the audit log. |
timestamp |
Long |
Timestamp of the audit log creation as unix timestamp in milliseconds. |
message |
String |
Summary message of the audit log. |
This type of error response may occur when invalid method arguments were passed.
{
"status": "ERROR",
"responseObject": {
"code": "ERROR_REQUEST",
"message": "Invalid method arguments."
}
}
This type of error response represents an unexpected error during processing the request.
{
"status": "ERROR",
"responseObject": {
"code": "ERROR_GENERIC",
"message": "Unknown error occurred while processing request."
}
}
get /admin/audit/{auditLogId} Read Audit Log Detail
Get a detailed audit log by the ID of the audit log.
Request
Path Params
Param | Type | Description |
---|---|---|
auditLogId * |
String |
ID of the audit log. |
Response
{
"id": "f400fe20-7114-4316-9264-1d505a9ef93a",
"timestamp": 1718276453230,
"message": "User with userId=user-123 recorded probe image.",
"params": {
"userId": "user-123",
"probeImage": "<base64 encoded image>"
}
}
Attribute | Type | Description |
---|---|---|
id |
String |
The ID of the audit log. |
timestamp |
Long |
Timestamp of the audit log creation as unix timestamp in milliseconds. |
message |
String |
Summary message of the audit log. |
params |
Object |
Parameters of the audit log, see the description below. |
The params
attribute of the detailed audit log response can contain:
userId
: the ID of the user associated with the event represented by the audit log.probeImage
: face image captured by a user, which format depends on the used verification provider.trustedImage
: base64 encoded image used as the reference face image.
This type of error response may occur when invalid method arguments were passed or the queried audit log ID does not exist.
{
"status": "ERROR",
"responseObject": {
"code": "ERROR_REQUEST",
"message": "Audit log was not found."
}
}
This type of error response represents an unexpected error during processing the request.
{
"status": "ERROR",
"responseObject": {
"code": "ERROR_GENERIC",
"message": "Unknown error occurred while processing request."
}
}