PrivyPrivy
Sign in
  • Documentation
Back to Documentation
Digital ID
Get Started
Changelog
Concepts
Guides
    Web IntegrationNative IntegrationCamera and PermissionsPrivy ButtonData DeliveryVerify the JWTEncrypted Identity DataServer CallbackSecurityProduction Readiness
API Reference
powered by Zudoku
Sign in
Guides

Native Integration

Load session_url directly in a native WebView. The widget sends the same events as the web integration through a native bridge.

PlatformEvent bridge
iOS WKWebViewProvide a handler for the ReactNativeWebView.postMessage(json) shim.
Android WebViewAdd a JavaScript interface named PrivyAndroid. The widget calls PrivyAndroid.postMessage(json).

Bridge messages are front-channel notifications for the user interface. They do not query the backend session status.

The bridge receives JSON in this form:

Code
{ "type": "privy:success", "payload": { "session_id": "9f1c2c8a-2d6f-4d60-9ab1-85a5d4aa93d0", "exchange_code": "single-use-code", "token": "eyJ...", "sections": [] } }

Trusted-host payload

A native WebView is a trusted host and receives the complete payload. The payload can contain:

  • exchange_code for server-to-server exchange.
  • token with the verified-data JWT.
  • sections with the shared-data preview.

Prefer the exchange-code flow. It prevents the token from traveling through the front channel. Always verify the JWT on the merchant backend. With the Identity package, decrypt my_identity on the backend after JWT verification.

See Camera and Permissions for the liveness-camera contract.

Last modified on October 23, 2026
Web IntegrationCamera and Permissions
On this page
  • Trusted-host payload
JSON