Skip to main content

iFrame Integration

To use face authentication with an iFrame, insert the verification platform URL directly into your iframe tag:
https://face.authentication.idenfy.com/?token={{token}}
The 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 ParameterExample Value
token3FA5TFPA2ZE3LMPGGS1EGOJNJE
Example redirect URL: https://face.authentication.idenfy.com/?token=3FA5TFPA2ZE3LMPGGS1EGOJNJE

Code example

<!DOCTYPE html>
<html>
  <body>
    <iframe
      id="iframe"
      style="width: 80%; height: 800px"
      src="https://face.authentication.idenfy.com/?token=3FA5TFPA2ZE3LMPGGS1EGOJNJE"
      allow="camera"></iframe>

    

    <script>
      window.addEventListener('message', receiveMessage, false);
      function receiveMessage(event) {
        console.log(event);
        // ...
      }
    </script>
  </body>
</html>

Webhook

You can receive information when face authentication actions are performed by setting up) a FACIAL_AUTHENTICATION notification type webhook.

Possible status values

NameDescription
SUCCESSAuthentication is successful. This message is also sent upon successful enrollment.
FAILEDAuthentication failed due to fraudulent activity or other possible vulnerabilities. This message is also sent upon enrollment failure.
EXPIREDFace authentication token expired before the user started the process.
CANCELEDFace authentication session was cancelled by the user.

Possible failReason values

FACE_MISMATCH
FAKE_FACE
VIRTUAL_CAMERA
FACE_NOT_FOUND
TOO_MANY_FACES
FACE_ANGLE_TOO_LARGE
FACE_TOO_SMALL
FACE_CLOSE_TO_BORDER
FACE_TOO_CLOSE
FACE_CROPPED
FACE_IS_OCCLUDED
EYES_CLOSED
FAILED_TO_PREDICT_LANDMARKS
PROBABILITY_TOO_SMALL
FAKE_CAPTURE
DUPLICATE_IMAGE

Webhook response example (EXPIRED)

{
  "id": "8d471b4c-3822-4547-aec5-a9d0cc0aa105",
  "scanRef": "8df398bb-7340-11ee-9aec-0221b1f59063",
  "clientId": "FD155HLZ5Z",
  "status": "EXPIRED",
  "token": "UbYZnDdrTElsSDBQFeNkd8MxI9CpSEO0qR5jtRcz",
  "type": "AUTHENTICATION",
  "method": "FACE_MATCHING",
  "facePhoto": null,
  "failReason": null,
  "ipAddress": null
}

iFrame Console Status Values

Information about the face authentication statuses is available in the browser console on the data object.
NameDescription
APPROVEDThe user completed face authentication and it was approved.
FAILEDThe 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.