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.