Face Liveness
Passive liveness detection enhances security for person and/or document authentication solutions. It adds detection and alerting capabilities when a printed photo or digital image or a screenshot from monitor/TV is presented for identity authentication or physical access control workflows.
API Call
To perform a face liveness check.
Send an HTTP POST request to:
/api/v1/id-verifications/face/liveness
The following parameters are used for requests and responses:
Parameter | Direction | Description |
---|---|---|
sessionId | request | unique, short-lived code to be generated by the client to track specific sessions |
faceImageBase | request | onboarded person photo, Base64 format or URL link to it |
sessionId | response | unique, short-lived code to be generated by the client to track specific sessions. Same as in request |
score | response | score of the check. Higher score means higher liveness level, default threshold is set to 0.8 |
hasError | response | boolean parameter - true - verification process ended up with some error; false - no errors |
error | response | error message in case of hasError set to true, informing about type of error, for instance FACE_NOT_FOUND |
Request
{
"faceImageBase": "data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgICAgQDAgICAgUEBAMEBgUGBgYFBgYGBwkIBgcJBwYGCAsICQoKCgoKBggLDAsKDAkKCgr...+SSyDCtmmrGoXzc8AcrURjKEjNOK6DII0ZyJFVgepUdKv26X0WVhuGcMPlBP3RVeFluDiNdvY8VbEUnO2UjaOTnrXoUZc8dTOdSUZEotL7A/eD/AL6oqVLJCoJmk6f3qKv2Rz+0if/Z",
"sessionId": "bbbf9002-c3a2-4308-b103-d80b9f5a2b84"
}
Response - Passive Liveness Passed
{
"sessionId": "bbbf9002-c3a2-4308-b103-d80b9f5a2b84",
"score": 0.9997104,
"hasError": false
}
Response - Passive Liveness Not Passed
{
"sessionId": "bbbf9002-c3a2-4308-b103-d80b9f5a2b84",
"score": 0.002324,
"hasError": false
}
Response - Error
{
"sessionId": "bbbf9002-c3a2-4308-b103-d80b9f5a2b84",
"hasError": true,
"error": "FACE_NOT_FOUND"
}
List of Errors
Error | Meaning | Description |
---|---|---|
FACE_NOT_FOUND | Failed to detect face | Face 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. |