iFrame Integration
To use face authentication with an iFrame, insert the verification platform URL directly into your iframe tag:token query string parameter is obtained after generating a token.
After the process is finished, you may close the iframe and display a desired page to your client.
| Query String Parameter | Example Value |
|---|---|
token | 3FA5TFPA2ZE3LMPGGS1EGOJNJE |
https://face.authentication.idenfy.com/?token=3FA5TFPA2ZE3LMPGGS1EGOJNJE
Code Example
Webhook
You can receive information when face authentication actions are performed by setting up aFACIAL_AUTHENTICATION notification type webhook.
Possible status Values
| Name | Description |
|---|---|
SUCCESS | Authentication is successful. This message is also sent upon successful enrollment. |
FAILED | Authentication failed due to fraudulent activity or other possible vulnerabilities. This message is also sent upon enrollment failure. |
EXPIRED | Face authentication token expired before the user started the process. |
CANCELED | Face authentication session was canceled by the user. |
Possible failReason Values
| Value | Description |
|---|---|
FACE_MISMATCH | The face does not match the enrolled reference photo. |
FAKE_FACE | A spoofing attempt was detected (e.g., printed photo, screen replay). |
VIRTUAL_CAMERA | A virtual or emulated camera was used instead of a physical device. |
FACE_NOT_FOUND | No face was detected in the captured image. |
TOO_MANY_FACES | More than one face was detected in the frame. |
FACE_ANGLE_TOO_LARGE | The face was turned too far from a frontal position. |
FACE_TOO_SMALL | The face occupies too small a portion of the frame. |
FACE_CLOSE_TO_BORDER | The face is too close to the edge of the image. |
FACE_TOO_CLOSE | The face is too close to the camera. |
FACE_CROPPED | Part of the face is cut off or outside the frame. |
FACE_IS_OCCLUDED | The face is partially covered (e.g., by a mask, hand, or object). |
EYES_CLOSED | The person’s eyes are closed. |
FAILED_TO_PREDICT_LANDMARKS | Facial landmark detection failed. |
PROBABILITY_TOO_SMALL | The face-match confidence score is below the required threshold. |
FAKE_CAPTURE | The capture process was tampered with or bypassed. |
DUPLICATE_IMAGE | The same image was submitted more than once. |
Webhook Response Example (EXPIRED)
iFrame Console Status Values
Information about the face authentication statuses is available in the browser console on thedata object.
| Name | Description |
|---|---|
APPROVED | The user completed face authentication and it was approved. |
FAILED | The user completed face authentication but it failed. |
To assess the face authentication session, evaluate the webhooks sent from the back-office. The statuses in the iFrame console are complementary.