Overview
| Feature | UniLink (No Backend) | API Session (With Backend) |
|---|---|---|
| Setup Time | < 1 minute | 5-10 minutes |
| Backend Required | ❌ No | ✅ Yes |
Custom vendor_data | ❌ No | ✅ Yes |
Custom metadata | ❌ No | ✅ Yes |
| Per-session Callback | ❌ No | ✅ Yes |
| Session Tracking | ❌ No | ✅ Yes |
UniLink Iframe (No Backend Required)
The fastest way to get started – just copy and paste your UniLink URL.What You Need
- A Didit workflow (created in the Didit Console)
- Your UniLink URL (click Copy Link on your workflow)
Implementation
⚠️ Required: The allow attribute is mandatory for camera access during liveness detection.
Key Benefits
- Less than 1 minute setup — No backend, no API keys
- Zero configuration — Callback URL set in workflow settings
- Ideal for MVPs — Get started immediately
API Session Iframe (With Backend)
For advanced integrations that need per-session customization.When to Use
- Pass custom
vendor_dataormetadataper session - Set different callback URLs per session
- Track sessions server-side before verification starts
- Associate sessions with your user IDs
Implementation
Step 1: Create a session (backend)Modal Implementation
For a polished modal experience that overlays your page:HTML/CSS/JS
React Component
A reusable React component for modal-based verification:Usage
Vue Component
Configuration
Required Permissions
Always include these permissions for camera and media access:| Permission | Purpose |
|---|---|
camera | Document scanning and face capture |
microphone | Video recording for liveness detection |
fullscreen | Optimal capture experience |
autoplay | Immediate camera activation |
encrypted-media | Secure media handling |
Responsive Design
Content Security Policy (CSP)
If you use CSP, add Didit to yourframe-src directive:
Cross-Device Verification
The InContext iframe automatically supports cross-device verification:- User starts verification on desktop
- If camera is unavailable, a QR code is shown
- User scans QR code on mobile
- User completes verification on mobile
- Desktop iframe automatically updates with result
Troubleshooting
Camera Not Working
- Ensure
allow="camera; microphone"is set on the iframe - Check that your site is served over HTTPS
- Verify the user has granted camera permissions to your domain
- Try the Redirect method if iframe camera access fails
Iframe Not Loading
- Check for Content Security Policy (CSP) issues
- Add
https://verify.didit.meto yourframe-srcdirective - Check browser console for errors
postMessage Not Received
- Verify you’re listening for the correct origin (
https://verify.didit.me) - Check that the event listener is added before opening the iframe
- Ensure the callback URL in your workflow matches
Example Repository
GitHub Repository
View source code and examples on GitHub