Skip to main content
The dashboard writes a starting snippet with your real chat URL. Open Distribute, then Mobile App, turn on Enable Bridge Events, and pick the React Native tab. The snippet on this page also relays widget messages to the app, which the WebView bridge requires.

Requirements

  • The react-native-webview package
  • Enable Bridge Events turned on for the agent

Snippet

Message wiring

The widget posts tars:ready twice. The bare one on mount is the cue to send tars:init, and the second carries version and capabilities. This handler answers both, and the widget ignores the repeat init. Handle at least tars:navigate, tars:data, and tars:close: the three capabilities the bridge declares in its tars:ready reply to tars:init. Field-level payloads for every message are in the bridge events reference.

Passing end-user data

Add userData and context to the tars:init payload, or post a tars:inject message later in the session. Both shapes are in the bridge events reference.