The Liveness Detection API allows you to perform a FaceScan of an image, determining whether the image belongs to a live face or not. This API is useful for verifying the authenticity of a face and ensuring that the provided image comes from a real person.
Verifik has a guide on what Liveness services are and how to use them; we invite you to read it: Liveness Guide.
You can use the liveness score to determine whether the provided image belongs to a live face or not. This API is valuable for various applications, including identity verification, fraud prevention, and ensuring that only live faces are used for authentication and access control.
import axios from 'axios';
const options = {
method: 'POST',
url: '<https://api.verifik.co/v2/face-recognition/liveness>',
params: {
},
headers: {
Accept: 'application/json',
Authorization: 'jwt <tu_token>'
},
data: {os: 'DESKTOP', image: 'base64_encoded_string'}
};
try {
notFou const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
{
"id": "JQ4RM",
"data": {
"passed": true,
"min_score": 0.6,
"liveness_score": 0.98
},
"signature": {
"message": "Certified by Verifik.co",
"dateTime": "January 16, 2024 3:44 PM"
}
}