When to Use WebView
Use WebView integration only when:- You’re building on a platform without a native SDK (e.g., Xamarin, Cordova, or other niche frameworks)
- You need a quick prototype or proof of concept before integrating the native SDK
- You’re migrating from web and want a temporary bridge to a native integration
How It Works
1
Create a session
Your backend calls the Create Session API and receives a hosted
url.2
Open in WebView
Your app loads the
url in a WebView component.3
User completes verification
The user goes through the verification flow inside the WebView.
4
Intercept callback
When done, the WebView navigates to your callback URL. Your app intercepts this navigation and extracts the result.
5
Get full results via webhook
Your backend receives the complete decision data via webhook.
Creating a Session
Before opening the verification flow, create a session from your backend:201 — the url embeds the 12-character session_token, not the session_id):
url field in the WebView — never build it from session_token by hand.
React Native
Install the WebView package:Implementation
React Native Demo
Expo + WebView verification example
Flutter
Add the required packages topubspec.yaml:
Implementation
Flutter Demo
Flutter WebView verification example
Critical Configuration
User Agent (Required)
You must set a generic mobile user agent for the WebView to work correctly:Media Settings (Required)
Handling the Callback
After verification, the WebView redirects to your callback URL with query parameters:Troubleshooting
Camera not working
Camera not working
- Ensure
mediaPlaybackRequiresUserGestureisfalse - Verify camera permissions are granted at the OS level
- Check that the user agent string is set correctly
White screen or loading issues
White screen or loading issues
- Verify the session URL is valid and not expired
- Check internet connectivity
- Ensure JavaScript is enabled in the WebView settings
Callback not triggering
Callback not triggering
- Verify your callback URL matches what you set when creating the session
- Check that the navigation delegate/listener is properly configured
- Try setting
callback_methodto"both"when creating the session