Requirements
- API key pair
- A successful verification already completed (
scanRef) - Face authentication token generation via API enabled (done by iDenfy staff)
- Face authentication credits
Learn More
Verify users quickly with face authentication — compares a live face to the ID document photo using matching and passive liveness detection.
Introduction
This guide covers token generation and checking whether a user can use face authentication. The token is needed for SDK initialization or iFrame integration. Checking the authentication status first is recommended, as it verifies whether the user has completed identification (verified with face and document).1. Check Face Authentication Status
Authorization:
API key pair
Method: GET
Endpoint: https://ivs.idenfy.com/identification/facial-auth/{scanRef}/check-status/?method=FACE_MATCHINGscanRef, the response will contain one of the following authentication types:
| Name | Description |
|---|---|
AUTHENTICATION | The user can authenticate by face |
IDENTIFICATION | The user must perform an identification |
If verification with the provided
scanRef does not exist (deleted or invalid), the endpoint returns status code 404.2. Generate the authToken
Authorization:
API key pair
Method: POST
Endpoint: https://ivs.idenfy.com/partner/authentication-infoIf the authentication type is
IDENTIFICATION, use the regular identification endpoint for generating a token. See the verification token generation guide.locale value can be passed to force a specific locale, and a lifetime JSON body value can be passed to set the session duration. The default is 30 minutes, with a maximum of 30 days. The value is set in seconds.
generateDigitString description
generateDigitString description
generateDigitString is optional. If provided, it returns a digitString to be used for face authentication on the iDenfy mobile app. The flow is as follows:- Your system calls the API endpoint to generate a face authentication session token, and a verification code is returned.
- On your platform, you prompt the user to open the iDenfy app and enter the returned
digitStringcode. - The user takes a selfie, closes the app, and returns to your platform.
- Once your system receives the results via webhook, it either allows the user to proceed or prompts them to retry by generating a new code.