WebView Flow

The WebView flow allows individuals to verify their identity in a mobile app with the Android WebView or iOS WKWebView.

❗️

WebView is not recommended

We recommend using our native mobile SDKs (Android, iOS) instead of WebView. WebView integrations experience lower conversion due to reduced performance. Support for WebView integration is only available for Enterprise customers.

For more information, see Native mobile integration vs. WebView.

The WebView flow allows individuals to verify their identity in an optimized mobile flow on the web. Persona hosts and manages the entire flow. Whenever an individual enters the flow, they are assigned a unique id tied to their session. This inquiry ID allows you to monitor their progress as they verify their identity.

840

Example WebView on Android and iOS in Sandbox mode

Request

Create a WebView and load https://withpersona.com/verify on Persona with the appropriate GET parameters. To test the WebView flow in the sandbox environment, use the sandbox host domain (environment=sandbox). Your URL will probably look something like this: https://withpersona.com/verify?is-webview=true&environment=sandbox&template-id=tmpl_JAZjHuAT738Q63BdgCuEJQre.

ParameterRequirementDescription
is-webviewrequiredWhen this field is set to true, the WebView flow is activated.
template-idrequiredThis ID corresponds to a pre-set configuration and determines how the flow is customized.
environmentThe Persona API environment on which to create inquiries. For sandbox and production, use sandbox and production respectively.
reference-idYou can generate and provide a unique ID which we will associate with the inquiry. The identifier can be used to monitor user progress in newly created inquiries. Inquiries with the same reference ID will be grouped under a single account.
redirect-uriThe URL that loads at the end of a canceled or successful Inquiry flow. The default is https://personacallback.

Response

Upon a successful or canceled inquiry, the WebView will redirect to the URL specified in redirect-uri or https://personacallback if nothing was specified. At this point, you can read the GET parameters in the response URL.

ParameterRequirementDescription
inquiry-idInquiry ID of the completed flow or empty if canceled
reference-idIf you set a reference ID on the request, it will be on the response

Next steps

If you want to see an example or just copy/paste some code and get off to the races, here you go!