Skip to main content

Face Verification

The face verification endpoint is essential for confirming an individual’s presence by matching their live capture against a pre-registered or document-linked photo. This process is integral for verifying identity authenticity, safeguarding against impersonation, and ensuring the person engaging with the service is who they claim to be.

API Call

To perform a face verification check, send an HTTP POST request to:

  • /api/v1/id-verifications/face/verify

Request Parameters

ParameterDirectionDescription
sessionIdrequestUnique, short-lived code to be generated by the client to track specific sessions.
probe/imageBase64requestLive or current photo captured during the verification process. Base64 format.
reference/imageBase64requestPreviously stored or found on an official document against which the probe image is compared. Base64 format.

Response Parameters

ParameterDirectionDescription
sessionIdresponseUnique, short-lived code to be generated by the client to track specific sessions. Same as in request.
scoreresponseScore of the verification, [0..100]. Higher score means higher probability level, default threshold is set to 27.
hasErrorresponseBoolean parameter - true if the verification process ended up with some error; false if no errors.
errorresponseError message in case of hasError set to true, informing about the type of error, for instance MISSING_PROBE_IMAGE.

Example Request

{
"sessionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"probe": {
"imageBase64": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgICAgQDAgICAgUEBAMEBgUGBgYFBgYGBwkIBgcJBwYGCAsICQoKCgoKBggLDAsKDAkKCgr..."
},
"reference": {
"imageBase64": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgICAgQDAgICAgUEBAMEBgUGBgYFBgYGBwkIBgcJBwYGCAsICQoKCgoKBggLDAsKDAkKCgr..."
}
}

Example Responses

Face Verification Passed

{
"sessionId": "bbbf9002-c3a2-4308-b103-d80b9f5a2b84",
"score": 99,
"hasError": false
}

Face Verification Not Passed

{
"sessionId": "bbbf9002-c3a2-4308-b103-d80b9f5a2b84",
"score": 23,
"hasError": false
}

Error

{
"sessionId": "bbbf9002-c3a2-4308-b103-d80b9f5a2b84",
"hasError": true,
"error": "MISSING_PROBE_IMAGE"
}

List of Errors

ErrorMeaningDescription
MISSING_PROBE_IMAGEImage is missingImage is missing, corrupted image, not a Base64 format image.
MISSING_REFERENCE_IMAGEImage is missingImage is missing, corrupted image, not a Base64 format image.
PROBE_FACE_NOT_FOUNDFailed to detect faceFace detector can’t find face on image. Face detection has probabilistic nature and may have errors. It also has some sensitivity level and very small faces may be ignored.
REFERENCE_FACE_NOT_FOUNDFailed to detect faceFace detector can’t find face on image. Face detection has probabilistic nature and may have errors. It also has some sensitivity level and very small faces may be ignored.
INTERNAL_ERRORInternal errorInternal error, contact us.