Menu

Integration

WebSDK (iframe)

The simplest integration is to send the user to sdk_url (redirect, new tab, or the link we deliver). To keep them on your page, embed it in an iframe. Your page's host must be on your account's allowlist, otherwise the browser refuses to frame it and you receive no events: send us the hosts during onboarding.

  • Entries are host names (app.example.com): no scheme, port or wildcard, each subdomain separately, at most 10. Pages on that host can frame the flow over HTTPS (and HTTP).
  • With no entries the flow cannot be framed at all; open sdk_url in a tab or redirect instead.
  • Changes apply to links issued after the change. A link we delivered (…/l/<code>) cannot be framed: frame sdk_url.
  • allow="camera" is all the iframe needs; your own page's Permissions-Policy must not block the camera.
HTML
<iframe
  src="{sdk_url}"
  allow="camera"
  style="width:480px; height:640px; border:none;"
></iframe>

On a desktop the WebSDK offers to continue on the user's phone with a QR code; the iframe waits for the result.

Events

TYPEPAYLOADWHEN
sdk.ready—The SDK has loaded
step.changedstep: welcome · document_front · document_back · liveness · processing · resultThe visible step changed (sent once per change)
session.completedsessionIdApproved, or in review: the same status the panel shows
session.failedsessionId, reason: rejected · expiredDeclined with no retries left, or the session expired (the panel shows Declined / Expired). A rejection with retries left sends nothing: the user can try again
JavaScript
window.addEventListener("message", (e) => {
  if (e.origin !== "https://verify.idotta.com") return; // only trust our origin
  switch (e.data?.type) {
    case "step.changed":      // e.data.step
      break;
    case "session.completed": // confirm on your backend: GET /v1/sessions/{e.data.sessionId}
      break;
    case "session.failed":    // e.data.reason: "rejected" | "expired"
      break;
  }
});

Language

Text
// English by default; 57 languages. Order: sdk.configure > ?lang= > browser language > your default_lang > en
// Send it after you receive sdk.ready (earlier messages are lost). Only "lang" is read; an unknown code is ignored.
iframe.contentWindow.postMessage({ type: "sdk.configure", lang: "fr" }, "https://verify.idotta.com");
  • The events are for your user interface only — base the decision on the webhook or `GET /v1/sessions/{id}`.
  • Events follow the panel. A link that stopped working (its 15 minutes are over, or sdk-link issued a newer one) shows "expired" but sends no event, because the session is still running: issue a new link. A decision that takes longer than about 3 minutes shows "under review" with no event; the event comes when the decision does.
  • On a desktop the QR hand-off uses the same link: after its 15 minutes both screens show "expired" (no event).
  • Reloading sdk_url resumes where the user was; a finished session shows its result again and repeats its final event.