Rendering chat with your own React Native components instead of a WebView? Use the headless packages.
What You Are Building
Add a Support screen to your app. That screen opens a WebView pointed at a small HTTPS page with the OpenCX widget already open.Implementation Steps
1
Create a support page
Host a page like
https://app.example.com/mobile-support. Your app will load this URL in a WebView.2
Add the widget
Give the page a real viewport height. Without this, the widget can load but the chat input may sit too high on the screen.
support.html
3
Open the page from your app
Add a Support button, Help Center row, or Account menu item that opens the WebView.
4
Test the mobile flow
Open the app, start a chat, close the screen, reopen it, and confirm the conversation still feels natural.
Open The WebView
- React Native
- iOS
- Android
Install
react-native-webview first if your app does not already use it.SupportScreen.tsx
Recognize Signed-In Customers
If customers sign in to your app, pass a verified contact token to the widget. This lets the same customer see their support history across devices.1
Request a token from your backend
Your backend calls OpenCX with your org API key. Do not call this from the mobile app.
2
Pass the token into the widget
Add the token to your support page config. Your backend can render it into the page or your app can request it before opening the WebView.
Send Useful Context
Give support enough context to help without asking the customer to repeat themselves.Handoff and native notifications
Human replies remain in the same widget session. There is noonHandoff widget option. hooks.onMessageReceived reports new messages and is not an immediate transfer event; do not use it to claim that a transfer has just completed.
For a native banner on a delivered human reply, check message.type === 'AGENT' in that hook and send a small event through your WebView bridge. Validate bridge messages and the loaded page origin in your native app. Keep tokens and message content out of bridge events unless your application requires them.
When switching accounts or logging out, update the verified widget identity and clear the previous native account’s state. Renew expiring tokens through your backend; see JWT renewal.
Mobile Checklist
Related Documentation
Install Widget
Web, React, and headless install paths.
Authentication
Verified contact tokens and history access.
Configuration
Inline mode, routing, theme, and context options.
Headless
Build custom rendering when WebView is not enough.