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.
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 buttonfinish.aborted: Sent on session failed screen, when clicking on the close buttonfinish.aborted.<abortReason>: Sent on session failed screen, when clicking on the close button
The abort reason can be:
USER_CANCELLATION_APP_NOT_RESPONDINGUSER_CANCELLATION_APP_NOT_SCANNINGUSER_CANCELLATION_CAMERA_ACCESS_DENIEDUSER_CANCELLATION_DOCUMENT_NOT_ALLOWEDUSER_CANCELLATION_DOCUMENT_NOT_AVAILABLEUSER_CANCELLATION_ESIGNING_NAME_CONFIRMATION_REJECTEDUSER_CANCELLATION_IDENTIFY_LATERUSER_CANCELLATION_PRIVACY_CONCERNSUSER_CANCELLATION_SELFIE_NOT_READYUSER_CANCELLATION_TERMS_DENIEDUSER_CANCELLATION_USER_NOT_INTERESTEDAPP_CANCELLATION_BROWSER_UNSUPPORTEDAPP_CANCELLATION_CAMERA_ERRORAPP_CANCELLATION_NO_BACK_SEGMENTATION_IMAGEAPP_CANCELLATION_NO_FRONT_SEGMENTATION_IMAGEAPP_CANCELLATION_UNKNOWN_ERRORUNKNOWN
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
}