In this section (24)

Add the messenger to your mobile app

Show the ChaosDesk messenger inside your iOS or Android app with a web view.

1 min read Beta

Available on Starter, Growth, Pro, Enterprise. Compare plans

This feature is still being built. Some steps or screens may change.

Your customers can chat with you from inside your own app. The app shows the messenger full screen in a web view, with the same features and the same conversation as on your website.

Native SDK packages for iOS, Android, React Native and Flutter are being built. Until they ship, use the web view approach below.

How it works

  1. Your app opens https://app.chaosdesk.io/messenger/embed?key=WIDGET_KEY&locale=en in a web view. Take the widget key from Admin Center, Channels, Messenger.
  2. The page opens the messenger in embedded mode: no launcher, the conversation fills the screen, and the header has a close button.
  3. Your app calls zE(...) in the web view, for example loginUser so the conversation is the customer’s on every device.
  4. The messenger sends events back to your app: open, close (dismiss the web view), unreadMessages (for a badge) and the result of loginUser.

Keep the web view’s data store persistent (the default) so the history survives app restarts.

Sign the customer in

Get the JWT from your own backend, the same way your website does. Never put the signing secret in the app. See Identify signed-in users in the messenger.

Code samples

The messenger SDK reference has the bridge names for iOS (WKWebView), Android (WebView) and React Native, and small samples for each.

Was this article helpful?