Face liveness

Supports response signature.

Face liveness

It checks whether the uploaded photo is authentic, detecting if it is not a photo or video.

POSThttps://api.mobile.combateafraude.com/faces/liveness
Query parameters
Header parameters
Body
imageUrlstring

URL of the image to be tested.

personobject

The purpose of these fields is to identify the user and avoid possible replay attacks.

Response

Success

Body
requestId*string

Unique identifier of request.

Example: "2b8f373-c462-4bbf-9a4f-8aeb7d71ec53"
isAlive*boolean

Indicates whether or not the person in the photo has passed the liveness.

Example: true
attemptId*string

Identifier of the attempt.

Example: "6021a21b3811c35ecb8dea20"
personobject

Information sent in the "person" attribute in the request.

messagestring

Reproval reason. Possible messages are 'Sua foto deve conter apenas um rosto', 'Seu rosto está muito próximo da câmera', 'Não encontramos nenhum rosto na imagem', 'Seu rosto está muito pequeno' or 'Seu rosto não está alinhado à câmera'.

Request
const response = await fetch('https://api.mobile.combateafraude.com/faces/liveness', {
    method: 'POST',
    headers: {
      "Authorization": "text",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "requestId": "2b8f373-c462-4bbf-9a4f-8aeb7d71ec53",
  "isAlive": true,
  "attemptId": "6021a21b3811c35ecb8dea20",
  "person": {
    "cpf": "00011122233",
    "name": "John Doe"
  },
  "message": null
}

Last updated

Logo

2023 © Caf. - All rights reserved