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.

This API currently supports basic authentication. All endpoints require an Authentication header in the following form:

Authorization: 'Basic ' + Base64.encode(username + ':' + password)

Send a HTTP POST request to:

  • /api/v1/face/verify

The following parameters are used for requests and responses:

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.
sessionIdresponseunique, short-lived code to be generated by the client to track specific sessions. Same as in request
scoreresponsescore of the verifiation, [0..100]. Higher score means higher probability level, default threshold is set to 27.
hasErrorresponseboolean parameter - true - verification process ended up with some error; false - no errors
errorresponseerror message in case of hasError set to true, informing about type of error, for instance MISSING_PROBE_IMAGE
Request:
{
  "sessionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "probe": {
    "imageBase64": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgICAgQDAgICAgUEBAMEBgUGBgYFBgYGBwkIBgcJBwYGCAsICQoKCgoKBggLDAsKDAkKCgr
...
+SSyDCtmmrGoXzc8AcrURjKEjNOK6DII0ZyJFVgepUdKv26X0WVhuGcMPlBP3RVeFluDiNdvY8VbEUnO2UjaOTnrXoUZc8dTOdSUZEotL7A/eD/AL6oqVLJCoJmk6f3qKv2Rz+0if/Z"
  },
  "reference": {
    "imageBase64": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgICAgQDAgICAgUEBAMEBgUGBgYFBgYGBwkIBgcJBwYGCAsICQoKCgoKBggLDAsKDAkKCgr
...
+SSyDCtmmrGoXzc8AcrURjKEjNOK6DII0ZyJFVgepUdKv26X0WVhuGcMPlBP3RVeFluDiNdvY8VbEUnO2UjaOTnrXoUZc8dTOdSUZEotL7A/eDDII0ZyJFVgepUdKv26X0WVhuGcMd4"
  }
}

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

Response - face verification not passed:
{
"sessionId": "bbbf9002-c3a2-4308-b103-d80b9f5a2b84",
"score": 23,
"hasError": false
}


Response - 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