Integration guide
Using the Identity Verification (IDV) service, you can enable a face comparison check that can be used to authenticate a user by using their selfie.
This check does an AI comparison between a live user selfie and the reference facial image to return a confidence score. Combined with a liveness check.
Face Auth (via a face comparison check) can be requested along with other checks (i.e. Document authenticity, Face match etc.) or as a standalone check.
Install the SDK
The Yoti Client SDK provides several helper methods to interact with the API. You can initialise the client using your unique SDK ID and PEM file.
Create a session
You can use the createSession method from the above "idvClient" to create a Yoti session. Session specification needs to be passed as an argument. After the session is successfully created, you will get a Session ID that can be used to retrieve the Session configuration.
Configure a session
To use this service, you need to create an Identity Verification session specification with at least two checks - Liveness and Face Comparison. Face Comparison check is only available as an automated check.
Create a Face Capture resource
Before uploading the user's facial image, you have to create a Face capture resource. To do this, a Requirement ID from the Face Capture requirements needs to be retrieved from the session config. This can then be used to create a Face Capture resource. If successful, you will receive a Resource ID.
Upload a facial image
To perform accurate face authentication, a user's facial image is required. You have to get the contents of this image, which can then be uploaded using the Yoti Client. You also have to pass in the Resource ID retrieved earlier.
Launch the User Interface
The next step is to load the Yoti Client SDK. To do this, you need the following parameters generated with the session creation request above:
Session ID
Session Token
We then utilise these to construct a Web URL which loads the Yoti Client SDK. The URL is in the following format:
Once the URL above opens in a web browser, it will take the user through the liveness capture flow. For more detailed steps, please refer to Launch the user view page.
Retrieve results
Once a session has been completed, the associated checks' results and resources can be retrieved using the session ID. Each check would contain a recommendation and a breakdown. The resources, however, are not directly included in the results, but contain a media ID. This can be used to fetch the actual media resource.
The user may have attempted liveness multiple times; the liveness results may contain multiple images, as a liveness result is generated for each allowed retry.
For a face comparison to be considered a 'PASS' overall, at least one Liveness check should be 'APPROVE', and the Face Comparison check is also 'APPROVE'.
Retrieve checks
Example response
The result of the face comparison check is under the FACE_COMPARISON check's report attribute. The following are examples of the report object for a match and a no-match result.
It is essential to comprehensively understand our sub checks and thoroughly examine all the results obtained from these checks. For more details about what each report shows, please refer to Session results.
Retrieve resources
To get the images of the user, you will need to retrieve a resource ID, which will then be used to retrieve the media (below).
Retrieve media
This is to retrieve the images from the session.
Got a question? Contact us here.