- PostMessage reference
Two ways to integrate
Embed the widget
Identity verification flows
PostMessage reference
Events the widget posts to your page (handle the ones you care about):
| Event | When | Your response |
|---|---|---|
INIT_CONFIG | Widget loaded and needs configuration | Send WIDGET_CONFIGS |
AUTH_REQUIRED | Widget needs a preauth token | Send PREAUTH |
IDENTITY_STARTED | Identity form opened | Optional: send IDENTITY to prefill |
LOGIN_SUCCESSFUL / LOGIN_FAILED | Login outcome | — |
USER_ENROLLED / IDENTITY_FAILED | Identity-verification outcome | — |
OTP_STARTED / ONBOARDING_STARTED | Step transitions in the Prefill + Onboarding flow | — |
SERVICE_FAILURE | An external service is down | — |
CLOSE | User clicked the close button | — |
Plus error events (UNKNOWN_USER, BAD_CREDENTIALS, PREAUTH_TOKEN_EXPIRED, THIN_FILE_ERROR, …) carrying the same SC-codes returned by the API.
Commands your page posts to the widget:
| Type | When | Payload |
|---|---|---|
WIDGET_CONFIGS | In response to INIT_CONFIG | Branding, flags, identity flow (see example) |
PREAUTH | In response to AUTH_REQUIRED | { token: 'eyJhbGciOi...' } or { token: null } on failure |
IDENTITY | In response to IDENTITY_STARTED | Identity fields to prefill — fname/lname/mobile (both Classic and Prefill + Onboarding) |
Full WIDGET_CONFIGS field list:
| Field | Type | Default | Description |
|---|---|---|---|
key | string | (required) | Your customer host key (UUID) |
flags | string | '0' | Feature-flags bitmask — controls which UI sections render |
theme | string | '#3f7cfc' | Primary brand color (hex) |
formLabelColor | string | — | Form label text color (hex) |
linkColor | string | — | Link text color (hex) |
popupModeForms | boolean | false | Show registration/identity forms in a modal popup |
redirectView | string | 'dashboard' | Post-login view: all-in-one / dashboard / tile-view |
identityDisclaimer | boolean | false | Show full disclaimer text on identity screen |
identityScreenTitleText | string | 'Sign Up' | Title text on the identity verification screen |
mobileIdentityScreenTitleText | string | — | Title text on the mobile verification screen |
hideBackgroundImg | boolean | false | Hide the default background image |
hideHeaderLogo | boolean | false | Hide the logo in the header |
hideFooterLogo | boolean | false | Hide the logo in the footer |
eidFailedRedirect | string | 'default' | Behavior on identity failure: close / none / default |
verificationMethod | string | 'dit_smfa' | Identity verification flow: dit_smfa (Digital Identity Trust + Secure Multi-Factor Authentication, default), prefill_onboarding (Prefill + Onboarding), or dit_customer_otp (Digital Identity Trust + Customer OTP) |