Embed Didit verification in an iframe: camera permissions and UniLink
Embed Didit verification with an iframe: the documented source is https://verify.didit.me/u/YOUR_WORKFLOW_ID_BASE64 plus the full allow attribute for camera and microphone.

Contents
In this guide
Jump to the part you need.
An embedded Didit iframe fits teams that want users to stay on their own page and launch in under a minute without a backend. The iframe source is https://verify.didit.me/u/YOUR_WORKFLOW_ID_BASE64, and the reusable UniLink is a separate shareable link. A full KYC check costs $0.33 per completed check. The main caveat is the camera: the iframe only gets camera and microphone access when its allow attribute lists them, and some mobile and in-app browsers refuse anyway. Redirect is the fallback.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
| Question | Answer |
|---|---|
| Which method should I start with? | InContext iframe with your workflow source, no backend, setup under one minute. |
| What is the iframe source? | https://verify.didit.me/u/YOUR_WORKFLOW_ID_BASE64, with your workflow's value in place of the placeholder. |
| What is a UniLink then? | One reusable link per workflow that you share as a button, an email, an SMS or a QR code. It is not the iframe source. |
| What size? | Width 100%, height 700px, no border. |
| Which permissions are required? | allow="camera; microphone; geolocation; clipboard-write; fullscreen; autoplay; encrypted-media; digital-credentials-get" |
| Do I need a backend? | No for a workflow iframe. An API session needs a backend, and the JavaScript SDK is optional. |
| Why will the camera not open? | The allow attribute is missing camera or microphone, your top-level page blocked the camera, the page is not HTTPS, or an in-app browser refuses. Redirect is the fallback. |
| What does it cost? | $0.33 per completed full KYC check. Sandbox testing is free and unlimited. |
| Where do results land? | The Business Console, webhooks, and GET /v3/session/{session_id}/decision/. |
Start free in the sandbox at business.didit.me, no sales call. The product behind the iframe is Didit InContext iframe, every number on this page is on the pricing page, and developers who want an AI assistant to build the flow can connect Didit through MCP.
Which web methods fit your case
The docs recommend the JavaScript SDK for production web apps, the InContext iframe for the quickest setup, and Redirect when cross-device verification is needed. Read that order as a default, not a rule: the iframe is a legitimate production choice for flows that run on one page, Didit publicly reports 4,000+ companies.
| Method | Backend required | Setup time | What you get | Pick it when |
|---|---|---|---|---|
| InContext iframe, no backend | No | Under 1 minute | Embedded flow, sessions in the Console | MVP, pilot, manual review, a kiosk or branch page |
| InContext iframe with an API session | Yes | Under 1 minute plus one API call | Embedded flow plus per-user session, callback and metadata | You need one session per user and your own identifier on it |
| JavaScript SDK | Optional | 3 minutes | Modal and inline modes, event callbacks, React, Vue, Angular, Next.js, Nuxt, Svelte | Production app that needs programmatic control |
| Redirect | Yes | 5 minutes | Full page on verify.didit.me, returns to your callback | Cross-device flows and iframe camera problems |
All of these methods deliver final, signed results through webhooks. The comparison above describes the in-browser experience, not how you receive the decision. If you automate, register a webhook destination and verify the signature before you trust the payload.
Prerequisites
- A Didit organization. Sign in at business.didit.me, create an organization, and keep the sandbox application for testing.
- A published workflow. KYC, Adaptive Age Verification, Biometric Authentication and Address Verification are the templates listed in the docs. The KYC template carries the ID document, passive liveness, face match and device and IP steps.
- The iframe source for that workflow,
https://verify.didit.me/u/YOUR_WORKFLOW_ID_BASE64, with your workflow's value in place of the placeholder. - The reusable UniLink for the same workflow, if you also want a shareable link for email, SMS or a QR code. It is a different link and it is not used as the iframe source.
- An API key from Settings, then API and Webhooks, only if you plan an API session or webhooks.
- A page served over HTTPS. Browsers only grant camera access in a secure context, so an http staging URL will fail even with correct markup.
- Edit rights on the host page, so you can set the
allowattribute and check that no site-wide permissions policy denies the camera.
Step by step: embed the verification iframe
- Open the Business Console and go to Workflows. Create the workflow your users should run, or copy one of the templates, then publish it.
- Take the iframe source for that workflow from the workflow settings:
https://verify.didit.me/u/YOUR_WORKFLOW_ID_BASE64, with your workflow's value in place of the placeholder. - Paste the snippet below into the page where the user should verify, with that source in the
src. - Add the
allowattribute exactly as written. Do not shorten it. It is the line that lets the embedded flow reach the camera and the microphone. - Keep the height at 700px and the width at 100%, with no border. Test on the smallest phone you support, because, as a practical testing note, a short iframe can crop the flow and push the forward button out of reach.
- Serve the page over HTTPS and open it in desktop Chrome first. The browser should ask for the camera when the flow reaches the face step.
- Run a sandbox session end to end. The session appears in the Console with its document, liveness, face match and IP results.
- When you need one session per user, per-user metadata or a callback per user, create the session with the API and put the returned
urlin the iframe source instead of the workflow URL.
<iframe
src="https://verify.didit.me/u/YOUR_WORKFLOW_ID_BASE64"
style="width: 100%; height: 700px; border: none;"
allow="camera; microphone; geolocation; clipboard-write; fullscreen; autoplay; encrypted-media; digital-credentials-get"
></iframe>
For an API session, the documented call returns the URL you embed:
curl -X POST https://verification.didit.me/v3/session/ \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"workflow_id": "11111111-2222-3333-4444-555555555555",
"callback": "https://yourapp.com/verification-complete",
"vendor_data": "user-123"
}'
The response contains session_id, session_token, url and status set to Not Started. Put url into the iframe source, keep the same allow attribute, and keep vendor_data as your stable key for the person.
The reusable UniLink is a separate link
Every workflow also has a UniLink: one reusable link, copied from the workflow settings, that starts the hosted flow with no backend. The docs suggest sharing it as a button on your site, by email, SMS or WhatsApp, or as a printed or on-screen QR code for a branch or kiosk. It is the right tool for a shareable link and the wrong value to paste into the iframe source, because the iframe loads the workflow URL shown above. The documented share button looks like this:
<a class="btn btn-primary"
href="https://verify.didit.me/verify/UNILINK_TOKEN"
rel="noopener"
target="_blank">
Verify your identity
</a>
Expected output
The user sees a Didit-hosted flow inside your page: consent where your workflow asks for it, document capture, then the face step where the browser asks for the camera. When the flow finishes, the iframe shows the result screen and the session lands in the Console with every check attached to it.

If everything is wired correctly you should see three things: the browser asking for the camera when the flow reaches the face step, the flow completing to its result screen, and a session in the Console with a status and decision data. For a flow started from a shared UniLink, an operator matches that session to the customer by hand. For an API session, vendor_data does the matching for you.
Why the camera may not open inside an iframe
The allow attribute is not optional
An iframe is a separate browsing context. Without a permission delegation on the allow attribute, the embedded page has no route to the camera or the microphone, and the browser does not even show a prompt. The documented list is camera; microphone; geolocation; clipboard-write; fullscreen; autoplay; encrypted-media; digital-credentials-get. Copy it whole.
Your top-level page holds the permission
The camera only reaches the frame when the allow attribute delegates it and the browser permission state for your page permits it. If the user blocked the camera for your domain on an earlier visit, the iframe cannot prompt for it again until that site permission is reset in the browser. A site-wide permissions policy that denies the camera has the same effect: the frame can never grant what the host withholds.
Insecure pages and embedded browsers
Camera access needs a secure context. A page on http, or on a preview URL that is not HTTPS, will not get the camera even with the correct attribute. In-app browsers inside social apps and some mobile WebViews are more restrictive still, and they can refuse camera access to an iframe regardless of your markup. This is a browser policy, not a Didit setting, so no configuration on our side changes it.

Diagnostic checklist
- Iframe source:
https://verify.didit.me/u/YOUR_WORKFLOW_ID_BASE64with your workflow's value, or theurlfrom Create Session. A stale or mismatched source is why a frame loads but the flow never starts. - allow attribute: the full documented list,
cameraandmicrophoneincluded, written verbatim. - HTTPS: the host page and the frame must both be in a secure context.
- Host permissions policy: confirm no site-wide policy on your page denies camera or microphone to the frame.
- Browser context: desktop Chrome in a fresh profile first, then a real phone, then the in-app browser your users actually arrive in.
What to do instead: Redirect
When the iframe cannot get the camera, use Redirect. It needs a backend because you create the session first and then send the browser to verificationUrl. The user leaves your page, verifies on the Didit-hosted page, and returns to your callback URL with verificationSessionId and status appended. Redirect provides broader browser compatibility when iframe camera access is problematic, and you trade the embedded experience for that.
// After creating a session via your backend
window.location.href = verificationUrl;
Failure cases and recovery
| Symptom | Likely cause | Fix |
|---|---|---|
| The iframe loads, no camera prompt ever appears | The allow attribute is missing camera, or your page sets a permissions policy that denies it | Use the full documented list and check the host page policy |
| The prompt appears and is blocked at once | The user denied camera access for your domain earlier | Reset the site permission in the browser, then reload |
| Works on desktop, fails on a phone or inside a social app | The in-app browser does not delegate camera to an iframe | Switch that surface to Redirect |
| Works on production, fails on a preview URL | The page is not a secure context | Serve the page over HTTPS |
| The flow looks cropped on a small phone | The iframe height is smaller than the flow needs | Set the height to 700px and test on a small phone |
| The iframe loads but the flow never starts | The workflow is not published, or the source does not match the workflow | Recopy the source from the workflow settings |
| The verification finishes but you have no record of who it was | A shared UniLink flow has no per-user identifier | Match in the Console, or move to an API session with vendor_data |
Inputs and outputs
| Item | Direction | Where it comes from | Notes |
|---|---|---|---|
| Iframe source | Input | Business Console, workflow settings | https://verify.didit.me/u/YOUR_WORKFLOW_ID_BASE64 with your workflow's value |
| UniLink | Input | Business Console, workflow settings | One reusable shareable link per workflow, not the iframe source |
allow permission list | Input | Your page markup | Required, verbatim, for camera and microphone |
workflow_id | Input | Create Session call | Required for an API session |
vendor_data | Input | Create Session call | Your stable identifier, echoed in webhooks |
callback | Input | Create Session call | Where the hosted flow returns the user |
language | Input | Create Session call | ISO 639-1 code for the flow UI |
session_id, session_token, url | Output | Create Session response | url is what you embed |
| Decision data | Output | GET /v3/session/{session_id}/decision/ or a webhook | Final, signed results arrive by webhook |
| Session status | Output | Console, webhook, decision endpoint | Starts at Not Started |
Modal and inline: when to move to the JavaScript SDK
If you need the flow to open as a modal or render inline under your own control, the JavaScript SDK is the documented route. It takes about three minutes, supports React, Vue, Angular, Next.js, Nuxt, Svelte and vanilla JS, and gives you completion callbacks instead of reading the Console. The SDK snippet below starts the flow with the url from Create Session, or with your UniLink.
import { DiditSdk } from '@didit-protocol/sdk-web';
DiditSdk.shared.onComplete = (result) => {
switch (result.type) {
case 'completed':
console.log('Verification completed!');
console.log('Session ID:', result.session?.sessionId);
console.log('Status:', result.session?.status);
break;
case 'cancelled':
console.log('User cancelled verification');
break;
case 'failed':
console.error('Verification failed:', result.error?.message);
break;
}
};
DiditSdk.shared.startVerification({
url: 'https://verify.didit.me/session/3FaJ9wLqX2Mz'
});
Working examples live in the Didit repositories: the iframe example covers UniLink and API-session iframes, and the SDK web examples cover React, Vue, Angular, Next.js, Nuxt, Svelte and vanilla.
What is billable and where review starts
You pay per completed check, from prepaid credit, and a check is billed only when it finishes with a result. A full KYC check is $0.33: ID document $0.15, passive liveness $0.10, face match 1:1 $0.05, and device and IP analysis $0.03. Add AML screening at $0.20 per check if your workflow includes it. Sandbox testing is free and unlimited, so the whole iframe build costs nothing until you go live.

Worked example, 2,500 completed full KYC checks in one month. At list price: 2,500 x $0.33 = $825.00, which is 2,500 x $0.15 ID + 2,500 x $0.10 liveness + 2,500 x $0.05 face match + 2,500 x $0.03 device and IP. On Scale every Didit price is 10% off, so the same check is $0.297: 2,500 x $0.297 = $742.50, a saving of $82.50. The Scale plan costs $299 a month and includes $350.00 of monthly credit. That credit is this month's budget and does not roll over, so $742.50 - $350.00 = $392.50 is paid from top-up balance, and top-ups are bought separately at face value and last 12 months. Total cash for the month: $299.00 + $392.50 = $691.50. On the Free plan, $10.00 of monthly credit buys about 30 checks at list price, and anything beyond that comes from top-ups of $50 to $20,000.
The review boundary is worth stating plainly. Didit returns evidence and a status; your team still makes the onboarding decision and owns the regulatory position. A workflow iframe with no backend is built for manual and operational review: an operator reads the session in the Console and matches it to internal records. When you want the decision applied automatically, move to an API session, register a webhook destination, verify the signature, and read the decision endpoint as the fallback.
Sources
- Didit docs: Web Identity Verification SDKs, JS and iframe
- Didit docs: InContext iframe
- Didit docs: JavaScript SDK
- Didit docs: Redirect
- Didit docs: Unilinks, reusable no-code verification links
- Didit docs: Create Session API
- Didit docs: Webhooks and HMAC signing
- Didit docs: Pricing and billing
- Didit pricing page and live price feed, read November 26, 2026
- Didit iframe example repository
- Didit SDK web examples repository
Next step: open the sandbox at business.didit.me, build one workflow, and paste the iframe with the full allow list into a test page. No sales call, and sandbox testing is free.
Try it
Try this in the sandbox
Run the check this guide describes, free.
The product this post is about, taken from its topic. Run it free in the sandbox.
Author
Alberto Rosas
Co-founder and CEO

Questions
Frequently asked questions
Why does the camera not open in a Didit iframe?
Two causes cover most cases: the iframe allow attribute does not list camera and microphone, or the browser already blocked the camera for your top-level domain. Add the full documented permission list, serve the page over HTTPS, and reset the site permission in the browser. If a mobile in-app browser still refuses, use Redirect, which the docs list as the option that works when iframe camera access is problematic.
Which permissions must the Didit iframe allow attribute include?
The documented list is camera; microphone; geolocation; clipboard-write; fullscreen; autoplay; encrypted-media; digital-credentials-get. Copy it exactly into the allow attribute of the iframe. Dropping camera or microphone is the most common reason a verification flow stalls at the face step.
Do I need a backend to embed Didit verification in an iframe?
No if you embed a workflow iframe: the documented source is https://verify.didit.me/u/YOUR_WORKFLOW_ID_BASE64, setup takes under a minute, and each visit creates a session you review in the Business Console. You need a backend for an API session, where you call POST /v3/session/ and embed the returned url, and for Redirect.
What is the difference between the iframe source and a UniLink?
The iframe source is the workflow URL the iframe loads, and it is the value the docs show in the InContext snippet. The UniLink is a separate reusable link per workflow that you share as a button, an email, an SMS or a QR code, and it starts the same hosted flow outside an iframe. Both are in the same workflow settings, and they are not interchangeable.
What height should the Didit iframe be?
The documented snippet uses width 100%, height 700px and no border. As a practical testing note, a shorter iframe can crop the flow and push the next button out of reach, especially on small phones. Test at the smallest viewport you support before you ship.
Does the iframe work on iPhone and inside in-app browsers?
Not reliably for camera access. Some mobile and in-app browsers will not delegate the camera to an embedded frame, and no markup on your side changes that. The documented answer is Redirect, which hosts the flow on verify.didit.me and returns the user to your callback URL.
How much does a verification cost in an iframe flow?
A full KYC check is $0.33 and includes ID document verification, passive liveness, face match 1:1 and device and IP analysis. You are billed only when a check finishes with a result, and sandbox testing is free and unlimited.
How do I receive the result of an iframe session?
Register a webhook destination and verify the X-Signature-V2 header before you trust the payload, or read GET /v3/session/{session_id}/decision/ as the fallback. For manual flows with no automation, results are visible in the Business Console. All integration methods deliver the same signed results by webhook.
Can I attach my own user ID to an iframe verification?
Yes, with an API session: pass vendor_data when you create the session and it is echoed in responses and webhooks. A shared UniLink has no per-user identifier, so operators match sessions to internal records in the Console. Moving to an API session is the reason most teams outgrow a shared link.
Is the sandbox free for iframe testing?
Yes. Sandbox testing is free and unlimited on every plan, and the sandbox keeps working even when live credit runs out. Build and test the whole iframe flow there, then swap the iframe source or API key for production when you go live.
Compliance built in
Audited, certified and attested.
We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center
- Regulation encoded into your flows
Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.
- Ready for AMLR
Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.
- Tested in Spain's Treasury sandbox
Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.
- Audited, not self-declared
iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.
Your obligations · 3 regions
SOC 2 Type 2
ISO 27001
iBeta Level 1 and Level 2
EU regulator attestation
FSM youth protection
GDPR
EBA remote onboarding
MiCA compatible
FIDO Alliance member
- AMLREU AML Regulation ready
Integration · Didit MCP
Run Didit from your own AI agent
Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.
- Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
- Run investigationsAsk why a session was declined, review cases, search people and companies.
- Change rulesCreate payment rules, test them on past data and switch them on.
- Pull reportsAsk for numbers, exports or the audit log.
Didit Academy


