Skip to content
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).

  1. Declare the camera permissionAndroid: <uses-permission android:name="android.permission.CAMERA" />. iOS: add NSCameraUsageDescription to Info.plist with a clear reason.
  2. Grant camera to the WebViewA WebView does not hand over the camera automatically. Android: implement WebChromeClient.onPermissionRequest and grant RESOURCE_VIDEO_CAPTURE after the runtime permission is given. iOS: use WKWebView with allowsInlineMediaPlayback = true (iOS 15+ prompts the user for the page).
  3. Allow file chooser fallbackAndroid: implement onShowFileChooser so the user can pick a photo if live capture is unavailable.
  4. Detect completionRely on your backend webhook. Optionally poll your own backend from the app for the status.
Android (Kotlin)
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)
iOS (Swift)
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.