Skip to main content

Legacy Iframe and Webview Events

To preserve continuity through the upgrade, the legacy events documented on this page are still emitted alongside the new ones. This retro-compatibility layer provides backward-compatible postMessage behaviour and URL redirections for customers who used previous iframe or webview integration methods.

If you previously integrated with VideoIdent or AutoIdent, the format and timing of the postMessages your app receives differ from the new DocIDV events.

info

For new integrations, follow the recommended approach in Web Integration methods.

Iframe and Webviews integration

To ensure a proper integration in Iframe or Webview in retro-compatibility mode, follow the same guidelines as described in Web Integration methods but do not provide the embedded parameter in the url.

Agent Assisted Flow Message Structure

All messages follow a consistent JSON structure with a type property that defines the message format:

{
"type": "<eventType>"
}

The message types are:

  • IDN_CONSENT_SCREEN_MOUNTED: Sent when the Consent screen is loaded and displayed to the user.
  • IDN_SUCCESS: Sent at the end of the flow without showing the success final screen.
  • IDN_FAILURE: Sent on session failed screen, when clicking on the close button.

Examples:

Consent screen loaded

{
"type": "IDN_CONSENT_SCREEN_MOUNTED"
}

Successful completion:

{
"type": "IDN_SUCCESS"
}

User-initiated abortion or technical error:

{
"type": "IDN_FAILURE"
}

Automatic Flow Message Structure

All messages are simple string structure. The status and the abort reason can be appended to base message. The message types are:

  • finish:
    • Sent on final success screen, when clicking on the finish button
    • Sent on session failed screen, when clicking on the close button
  • finish.success: Sent on final success screen, when clicking on the finish button
  • finish.aborted: Sent on session failed screen, when clicking on the close button
  • finish.aborted.<abortReason>: Sent on session failed screen, when clicking on the close button

The abort reason can be:

  • USER_CANCELLATION_APP_NOT_RESPONDING
  • USER_CANCELLATION_APP_NOT_SCANNING
  • USER_CANCELLATION_CAMERA_ACCESS_DENIED
  • USER_CANCELLATION_DOCUMENT_NOT_ALLOWED
  • USER_CANCELLATION_DOCUMENT_NOT_AVAILABLE
  • USER_CANCELLATION_ESIGNING_NAME_CONFIRMATION_REJECTED
  • USER_CANCELLATION_IDENTIFY_LATER
  • USER_CANCELLATION_PRIVACY_CONCERNS
  • USER_CANCELLATION_SELFIE_NOT_READY
  • USER_CANCELLATION_TERMS_DENIED
  • USER_CANCELLATION_USER_NOT_INTERESTED
  • APP_CANCELLATION_BROWSER_UNSUPPORTED
  • APP_CANCELLATION_CAMERA_ERROR
  • APP_CANCELLATION_NO_BACK_SEGMENTATION_IMAGE
  • APP_CANCELLATION_NO_FRONT_SEGMENTATION_IMAGE
  • APP_CANCELLATION_UNKNOWN_ERROR
  • UNKNOWN

Webview Integration

Some specific messages follow a JSON structure. The message types are:

  • CONNECTION_CLOSED: Sent when the websocket connection is closed.
  • DOWNLOAD_FILE: Sent on Consent screen, when clicking on an approval phrases link.

Examples:

websocket connection closed

{
"type": "CONNECTION_CLOSED",
"data": {}
}

Approval phrases link clicked:

{
"type": "DOWNLOAD_FILE",
"data": pdfLink
}