Validate Biometric Validation

Here’s the API documentation for the Validate Biometric Validation endpoint, based on the provided data and example:


POST /v2/biometric-validations/validate

Description

This endpoint is used to validate a biometric session based on liveness results or image data. The validation checks if the provided biometric data (such as an image) corresponds to the active session.

URL

https://api.verifik.co/v2/biometric-validations/validate

Method

POST

Headers

ParameterTypeDescription

Authentication

string

The JWT token you got from the Creation of the Biometric Validation

Request Body Parameters

ParameterTypeDescriptionRequired

image

string

Base64 encoded image data used for biometric validation.

Yes

os

string

The operating system of the client device (e.g., "ios", "android").

Yes

Example Request

curl --location --request POST 'https://api.verifik.co/v2/biometric-validations/validate' \
--header 'Authorization: Bearer <JWT token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "image": "/9j/4AAQSkZJRgABAQAAAQABAAD...",
    "os": "ios"
}'

Example Node.js (Axios) Request

const axios = require('axios');

let data = JSON.stringify({
  "image": "/9j/4AAQSkZJRgABAQAAAQABAAD...",
  "os": "ios"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.verifik.co/v2/biometric-validations/validate',
  headers: {
    'Authorization': 'Bearer <JWT token>',
    'Content-Type': 'application/json'
  },
  data: data
};

axios.request(config)
  .then((response) => {
    console.log(JSON.stringify(response.data));
  })
  .catch((error) => {
    console.log(error);
  });

Example Response

{
    "data": {
        "appLogin": {
            "_id": "66e3338e90c120bf345a1dcc",
            "client": "613375a1eab2fe08527f81e2",
            "name": "Carlos Bleck",
            "status": "validated",
            "project": "6266193db77ccc8111730c90",
            "projectFlow": "658ed28b0990f300134d7b78",
            "type": "faceLiveness",
            "biometricValidation": "66e3338e90c120bf345a1dca",
            "updatedAt": "2024-09-12T18:32:17.224Z",
            "createdAt": "2024-09-12T18:31:42.723Z",
            "__v": 0,
            "face": "66e333b090c120bf345a1ddf"
        },
        "livenessSession": {
            "_id": "66e3338e90c120bf345a1dc8",
            "client": "613375a1eab2fe08527f81e2",
            "project": "6266193db77ccc8111730c90",
            "projectFlow": "658ed28b0990f300134d7b78",
            "identifier": "03da12fba",
            "status": "active",
            "livenessResult": [],
            "comparisonResult": [],
            "generalInformation": [],
            "documentTypeFields": [],
            "location": [],
            "proFields": [],
            "studioFields": [],
            "promptFields": [],
            "expiresAt": "2024-09-12T18:35:42.000Z",
            "activatedAt": "2024-09-12T18:31:42.524Z",
            "updatedAt": "2024-09-12T18:31:42.526Z",
            "createdAt": "2024-09-12T18:31:42.526Z",
            "__v": 0
        },
        "person": "6633eabb0ced0451db577393",
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY2ZTMzMzhlOTBjMTIwYmYzNDVhMWRjYyIsInBlcnNvbiI6IjY2MzNlYWJiMGNlZDA0NTFkYjU3NzM5MyIsInAiOiI2MjY2MTkzZGI3N2NjYzgxMTE3MzBjOTAiLCJwZiI6IjY1OGVkMjhiMDk5MGYzMDAxMzRkN2I3OCIsImFjY2Vzc1R5cGUiOiJsb2dpbl9saXZlbmVzcyIsImlhdCI6MTcyNjE2NTkzN30.Gi1y86EjJBdBQ8IJvlaov1K3uZuVvgpGtFYwIZLtiM8"
    },
    "signature": {
        "dateTime": "September 12, 2024 6:32 PM",
        "message": "Certified by Verifik.co"
    },
    "id": "K5B3J"
}

Response Details

  • data.appLogin: Details about the login session created for the app:

    • _id: The unique identifier for the login session.

    • client: The unique identifier for the client.

    • name: The name of the person validated.

    • status: The current status of the session (e.g., "validated").

    • project: The ID of the project associated with this validation.

    • projectFlow: The flow ID for the project.

    • type: The type of biometric validation (e.g., "faceLiveness").

    • biometricValidation: The ID of the biometric validation used.

    • updatedAt: The timestamp when the session was last updated.

    • createdAt: The timestamp when the session was created.

    • face: The ID of the face validation associated with this session.

  • data.livenessSession: Details about the liveness session used for validation:

    • _id: The unique identifier for the liveness session.

    • client: The unique identifier for the client.

    • project: The project ID associated with the session.

    • identifier: The session identifier.

    • status: The status of the session (e.g., "active").

    • livenessResult: Results of the liveness check (array).

    • expiresAt: The expiry timestamp for the session.

    • createdAt: The timestamp when the session was created.

    • updatedAt: The timestamp when the session was last updated.

  • data.person: The ID of the person involved in the biometric validation.

  • data.token: A JWT token associated with the session.

  • signature: A signature confirming the biometric validation was certified by Verifik.

    • dateTime: The date and time the validation was certified.

    • message: The certification message.

Error Responses

Status CodeDescription

400

Bad Request. Invalid or missing parameters.

401

Unauthorized. Invalid or missing authorization token.

500

Internal Server Error. An error occurred on the server.

Notes

  • Ensure that the image field contains the correct base64 encoded data.

  • The Authorization header must include a valid JWT token.

  • This endpoint performs a liveness check and validates the biometric session based on the provided data.

Last updated