- Your app runs on a device that may not have a camera (desktop web app, kiosk)
- You want the verification UI to live on the user’s mobile device while the rest of your app runs elsewhere
- You want to embed Tuteliq’s verified UI in a webview without rebuilding the capture flow yourself
Age Verification Quick Start
Verify a user’s age in three steps with a hosted verification session. This is the exact flow you can try interactively in the API Playground in your dashboard, the document scan, selfie, and liveness checks all happen on Tuteliq’s hosted page, so you never handle the user’s ID or biometric data yourself.Hosted age verification requires the Pro plan or above and costs 5 credits per completed verification. You’ll need an API key, create one under API Keys in your dashboard.
How it works
Tuteliq creates a short-lived, hosted verification session and returns a URL. You send your user to that URL, they complete the checks on Tuteliq’s page, and you poll the session until it reaches a terminal status.- Create a session with
mode: "age". - Redirect the user to the returned verification URL.
- Poll the session for the result.
1. Create a session
Send aPOST to /api/v1/verify/session with the mode set to age.
2. Send the user to verify
Open themobile_url in a new tab, redirect to it, or surface it as a QR code / deep link. The user scans their ID document and completes a selfie liveness check on Tuteliq’s hosted page.
3. Poll for the result
PollGET /api/v1/verify/session/{session_id} every few seconds until the top-level status reaches a terminal value: completed, failed, expired, or cancelled. The verification outcome lives at result.status.
result.status (verified, failed, or needs_review), result.is_minor (boolean), result.age (integer years), and result.failure_reasons (array, empty on success). The full result.document, result.document_validation, result.face_match, and result.liveness sub-objects are available when you need detailed evidence for your own audit logs or moderator UI.
Full example
The complete create → redirect → poll flow in TypeScript:Flow at a glance
Step 1: Create a session (server-side)
Always create the session on your server with your API key. Never expose your API key on the client.Response
expires_at is a Unix millisecond timestamp; sessions are valid for 15 minutes after creation. The mobile_url is single-use and tied to the session. Tokens are revoked the moment the session completes, fails, or expires.
Modes and tier availability
Both modes return the verified data to your server so you can act on it. Tuteliq does not retain any of it after the response is sent. See Zero retention below.
Step 2: Hand the URL to the user
Three patterns, pick the one that fits your product:Pattern A: Embed in a webview (same-device flow)
The user’s session lives inside your app. The webview loadsmobile_url, the user completes capture without leaving your app, you get the result back via SSE.
This is the most common pattern for mobile apps.
- iOS (Swift / WKWebView)
- Android (Kotlin / WebView)
- React Native
- Flutter
- Web (iframe)
NSCameraUsageDescription and NSMicrophoneUsageDescription for the in-page capture to work.Pattern B: QR code (desktop-to-mobile handoff)
The session is created on your desktop app or website; the user scans a QR code with their phone and completes verification on the phone.Node
status: "completed".
Pattern C: Redirect (single-device, browser-only)
Best for low-friction onboarding flows where the user is already on mobile in your web app.Node
redirect_url. Your redirect_url handler then calls your backend to read the result.
Step 3: Watch status updates
Two ways to know when the verification is done. Server-Sent Events is the recommended primary channel; polling is the fallback.Option A: Server-Sent Events (recommended)
The session emits real-time events you can listen to with no polling overhead. Works from any client (browser, mobile, server).Web / browser
Option B: Polling
If your environment can’t hold an open SSE connection (e.g. serverless functions with short timeouts), poll instead:Step 4: Read the final result
The result is included in the SSEresult event AND accessible via GET /api/v1/verify/session/:id once the session is in a terminal state.
Age verification result
See the full shape in Step 3 above. The body is identical whether you receive it through SSE or the polled GET.Identity verification result
Identity mode (Business plan and above) returns the same outer envelope as age mode (session_id, status, result, created_at, expires_at), but the inner result object differs:
full_name and date_of_birth PII required for KYC, plus a face_match score, but does not include the document-validation sub-checks block.
Status states
Common pitfalls
Webview camera permission
iOS and Android webviews deny camera access by default. You must explicitly grant it in both the webview configuration and the host app’s permission manifest. The samples above include the right configuration for each platform.CORS for the iframe pattern
If you embed via<iframe>, browsers require allow="camera; microphone" on the iframe element, AND your parent page must be served from an HTTPS origin (browsers block camera permission on plain HTTP).
SSE behind reverse proxies
If your client connects through nginx, Cloudflare, or other proxies, SSE connections need:proxy_buffering offproxy_cache off- Connection timeout > 5 minutes (Tuteliq holds the SSE open for the full session lifetime)
Server-side session ownership
Only the API key that created a session can callGET /api/v1/verify/session/:id or DELETE. The mobile capture URL and the SSE events endpoint are session-token-authenticated (the URL contains the token) and do not need your API key. Keep the API key on your server, never expose it to the client.
Session expiry
Sessions expire 15 minutes after creation. If the user is slow, give them a fresh session rather than extending the old one; the expiry is a security feature, not a quota.Zero retention
There are two things to keep separate:- What’s returned to your server. The verification result includes the fields you need to act on: verified age, full name (identity mode), date of birth, document type, country, face match, liveness, and the document-validation sub-checks. Your application is the only place this data lives going forward. You are the controller for it under GDPR; Tuteliq is the processor for the duration of the API call and nothing more.
- What Tuteliq retains. Nothing. The uploaded document images, the selfie, the captured liveness frames, and the extracted PII are all held in memory only for the duration of the request, then destroyed when the response is sent. No persistent storage, no derived hashes, no embeddings, no fingerprints, no training corpus contribution.
Reference: full Node.js end-to-end
Next steps
- Document checks: what Tuteliq validates per country (45 supported)
- Liveness detection: how the anti-spoofing layer works
- Fraud prevention: cross-referencing layers and recapture detection
- Webhooks: alternative to SSE for high-volume server-side delivery