Guide · Developer · 7 min
Integrate in a mobile app (WebView + camera permissions)
Open the hosted flow in a WebView and grant camera access correctly.
Your app's backend creates the session and passes verificationUrl to the app. The app opens it in a WebView (or the system browser, which is simpler and needs no extra permission code).
- Declare the camera permissionAndroid:
<uses-permission android:name="android.permission.CAMERA" />. iOS: addNSCameraUsageDescriptionto Info.plist with a clear reason. - Grant camera to the WebViewA WebView does not hand over the camera automatically. Android: implement
WebChromeClient.onPermissionRequestand grantRESOURCE_VIDEO_CAPTUREafter the runtime permission is given. iOS: useWKWebViewwithallowsInlineMediaPlayback = true(iOS 15+ prompts the user for the page). - Allow file chooser fallbackAndroid: implement
onShowFileChooserso the user can pick a photo if live capture is unavailable. - Detect completionRely on your backend webhook. Optionally poll your own backend from the app for the status.
webView.settings.javaScriptEnabled = true
webView.settings.mediaPlaybackRequiresUserGesture = false
webView.webChromeClient = object : WebChromeClient() {
override fun onPermissionRequest(request: PermissionRequest) {
runOnUiThread { request.grant(request.resources) } // after you hold CAMERA at runtime
}
}
webView.loadUrl(verificationUrl)let config = WKWebViewConfiguration()
config.allowsInlineMediaPlayback = true
let web = WKWebView(frame: .zero, configuration: config)
web.load(URLRequest(url: URL(string: verificationUrl)!))Native capture
If you would rather build your own camera screen, the upload routes (/upload, /selfie) are documented in the API reference. You then own capture quality and guidance.