Face Validation

When you are creating the Web Flow, from the Validator Blocks you can select the Face Mach Block. This module allows you to validate the similarity between a reference face and the photo or video taken at the time of validation.

Prerequisites

In order to make the comparison between faces you must upload a base photo, which will be compared with the photo uploaded by your user.

To upload the base photo, please follow these steps:

  1. Create an Enrollment

    • Create a POST request to the endpoint https://api.validations.truora.com/v1/enrollments.
    • Set the following key:value pairs within the request body using the application/x-www-form-urlencoded format:
      • type: [Required] set to face-recognition
      • user_authorized: [Required] Indicates whether the person subject to the validation authorized the validation. Must be true in order to proceed.
      • account_id: The account_id is a unique value assigned to each user in the system to distinguish them and access their information and processes. Go to Create an Account ID to learn how create it.

    You will receive a Response similar to the following:

Response 200

Note:

  • Enrollment status will be pending until a success or failure Face Validation response is received.
  • The account_id, enrollment_id and file_upload_link returned by this endpoint will be used in subsequent steps.
  1. Upload Reference Photo

    • Create a PUT request to the URL returned in the file_upload_link field of the previous step.
      Response 200
  2. Get Enrollment The enrollment status will be success or failure depending on the response provided by the Face Validation. Until the Face Validation is completed, the enrollment status will remain as pending.

    • Create a GET request to the endpoint https://api.validations.truora.com/v1/enrollments/{{enrollment_id}}.
Response 200 - Pending Status
Response 200 - Success Status

Face Match Block

Now add the Face Match Block to your flow and choose the method with which you want to perform the face matching:

  • Video Selfie: The user must upload a short video looking at the camara, without instructions. Formats supported are: webm, mp4, avi, and mov. Maximum size is 10 MB Recommended for: WhatsApp, API integration, Web.

  • Guided video The user must upload a short following some instructions (e.g: look up, look down, look right). Formats supported are: webm, mp4, avi, and mov. Maximum size is 30 MB. Recommended for: WhatsApp, Web. [Deprecated]

  • Photo The user must take a picture of his or her face. formats supported are: jpeg, png and webp. Maximum size is 10 MB. Recommended for: API integration, Web.

doc_face_box

Properties

  • Threshold: Similarity between the provided picture and video that is required to pass the validation from 0 to 1. By default, the treshold is set to 0.65.
propeties
  • Additionally:

    • You can configure others parameters to improve the behavior of the validators and the user experience. Please see Config Validator Guide for more information on customization.

    • If face recognition fails you can see declined reason here: **Face Recognition declined reason.

    • Remember also you could customize your web flow. For more information please visit Customize Web Flow guide.

Integrating Your Flow

Once you have finished and testing the Flow, you need to integrate it. Please check out the following guide for more information: How to create a Web Integration Token

Note: Please keep in mind that at this point you may be asked for the account_id parameter with which you performed the enrollment process.

Get Results of Validation

  • You can get the validation results with a query to the Truora’s API or from the dashboard. For more information, please see Guide to Get Results.

  • The information about the results of the validations made to the user can be notified through Webhooks. This alternative allows you to receive hooks of the actions/rules created.