Mobile App Drop-In
Add VerifyHuman verification to an existing iOS, Android, React Native or Flutter app without building native verification screens: your app opens a VerifyHuman hosted page in the system browser container, and your backend confirms the result.
Integration tier: the drop-in sits between Hosted Verification Pages (a shared link) and the Mobile API (native REST integration).
When to use it
- You already have a mobile app and want verification without native camera, liveness, retry and completion screens.
- You want VerifyHuman to run the verification experience.
- You want results delivered to your backend by signed webhook.
Use the Mobile API instead if you need a fully native UI.
How it works
Mobile app Your backend VerifyHuman
────────── ──────────── ───────────
1. "Verify" tapped ───▶ 2. POST /api/v1/hosted/pages/{page}/attempts
(X-API-Key, return_url = your HTTPS app link)
3. store attempt_token with the user's session
◀─── 4. return verification_url
5. open verification_url in SFSafariViewController / Custom Tabs
───▶ 6. user verifies
7. signed webhook ◀─── (liveness, ID…)
8. return via HTTPS app link (…?attempt=<token>) ◀──────────────
9. app asks your backend for the result; backend answers from the
webhook it has verified
- Create a persistent hosted page once (dashboard Wizard or VerifyFlow).
- For each user, your backend starts an attempt with the
Hosted Attempts API and returns
verification_urlto the app. No VerifyHuman key is ever in the app. - The app opens the URL in the system browser container.
- When the user finishes, VerifyHuman sends them to your
return_urlwith?attempt=<attempt-token>appended. - Your backend confirms the result with the signed webhook and checks that
the returned
attemptmatches the one it stored for that user.
The return to your app is a UX signal only. It tells your app the user is back, not that verification succeeded. Always confirm on your backend.
Return URLs: use HTTPS app links
return_url (and a hosted page's success and failure URLs) must be HTTPS on
Live pages; custom URL schemes such as myapp:// are not accepted. A
per-attempt return_url must also be on a domain registered for your API key.
Use an HTTPS link that opens your app:
- iOS: a Universal Link
on your domain (for example
https://app.example.com/verify-complete). - Android: an App Link on the same domain.
If the app is not installed or the link is not claimed, the user lands on that HTTPS page in the browser; serve a short "return to the app" page there.
Recommended browser containers
iOS
Recommended: SFSafariViewController.
import SafariServices
import UIKit
final class VerificationViewController: UIViewController {
func startVerification(verificationUrl: String) {
// verificationUrl comes from your backend (Hosted Attempts API).
guard let url = URL(string: verificationUrl) else { return }
let safari = SFSafariViewController(url: url)
safari.dismissButtonStyle = .close
present(safari, animated: true)
}
}
SFSafariViewController uses Safari's camera permission model. Avoid
WKWebView unless you have verified camera access on your target devices.
Android (Kotlin)
Recommended: Chrome Custom Tabs.
import android.content.Context
import android.net.Uri
import androidx.browser.customtabs.CustomTabsIntent
fun startVerification(context: Context, verificationUrl: String) {
// verificationUrl comes from your backend (Hosted Attempts API).
CustomTabsIntent.Builder()
.setShowTitle(true)
.build()
.launchUrl(context, Uri.parse(verificationUrl))
}
implementation "androidx.browser:browser:1.8.0"
Avoid a raw android.webkit.WebView: camera access is blocked by default.
React Native
import { Linking } from 'react-native';
export async function startVerification(verificationUrl) {
// verificationUrl comes from your backend (Hosted Attempts API).
if (!(await Linking.canOpenURL(verificationUrl))) {
throw new Error('Unable to open verification URL');
}
await Linking.openURL(verificationUrl);
}
Handle the HTTPS return link with your app's universal-link / App Link handler, then ask your backend for the confirmed result.
Flutter
import 'package:url_launcher/url_launcher.dart';
Future<void> startVerification(String verificationUrl) async {
// verificationUrl comes from your backend (Hosted Attempts API).
final uri = Uri.parse(verificationUrl);
if (!await launchUrl(uri, mode: LaunchMode.externalApplication)) {
throw Exception('Unable to open verification URL');
}
}
dependencies:
url_launcher: ^6.3.0
Confirming the result
Configure a webhook endpoint for the page's environment. On
verification.completed, verify the signature and timestamp, then check
environment and the data.verification_type and data.status fields, and
store the result against the user who owns the attempt. See the
backend pattern for a complete example.
While the webhook is in flight, the app shows "Confirming your result…" and
polls your backend. The public GET /hosted/status/<attempt-token> reports
progress only and is not proof of a result.
Test mode
Create the page with a Test key to get a Test page: no real biometric verification runs and nothing is charged. Test webhooks go only to endpoints configured for the Test environment. Test results never satisfy a Live check.
Checklist
- No VerifyHuman API key or secret is in the app binary.
- Attempts are started by your backend, which stores each
attempt_token. return_urlis an HTTPS universal link / App Link on a registered domain.- Results are confirmed from verified webhooks, and each
verification_idis accepted once.