Native apps
The quickest way into a native app is the hosted app page: the full chat, full screen, made for a WebView. Your app opens it, your server gives it a token, and a small bridge tells the app when to close the screen or open its login.

1. Turn on the app channel
Section titled “1. Turn on the app channel”In Settings → Channels, add app. App conversations then show up separately in Conversations and Analytics.
2. A token endpoint on your server
Section titled “2. A token endpoint on your server”An app has no website address, so it cannot start a guest chat by itself. Your server signs a visitor token for every app user. Because of that you can turn Settings → Guest sessions off: minted tokens keep working, and nobody can open an anonymous chat with your publishable key.
| User | vid |
ext |
ch |
|---|---|---|---|
| Signed in | customer-<id> |
your customer id | app |
| Guest | app-<random id saved on the device> |
none | app |
Return the token with the chat URL:
{ "token": "eyJ…", "expiresAt": "2026-10-10T12:00:00Z", "url": "https://api.example.com/widget/app.html?key=pk_…&locale=tr&channel=app"}Protect the endpoint like your other app calls, and use the visitor secret only on the server.
3. Open the page
Section titled “3. Open the page”Load url#token=<token>. The token goes in the fragment so it never reaches a server log.
| Query parameter | Meaning |
|---|---|
key |
Your publishable key (required) |
locale |
The chat’s language, e.g. tr |
channel |
Default app |
title |
Overrides the header title |
Tokens last at most 24 hours. Fetch a new one before it expires, and when the user signs in or out, and pass it to the open page:
window.Helpvane.setToken('<new token>');4. Listen to the bridge
Section titled “4. Listen to the bridge”The page sends JSON strings { "type": …, "payload": … }:
type |
When | What the app does |
|---|---|---|
ready |
The chat loaded | Optional: hide a spinner |
close |
The user pressed ✕ | Close the chat screen |
signin |
The user pressed “Sign in” | Open the app’s login; afterwards send a signed-in token |
action |
A card button was pressed (payload.product.url for products) |
Open the product in the app |
status |
The conversation was handed over, solved or closed | Optional |
iOS (WKWebView): add a script message handler named helpvane:
config.userContentController.add(handler, name: "helpvane")// handler.userContentController(_:didReceive:) → message.body is the JSON stringAndroid (WebView): add a JavaScript interface named HelpvaneBridge:
webView.settings.javaScriptEnabled = truewebView.settings.domStorageEnabled = truewebView.addJavascriptInterface(object { @JavascriptInterface fun postMessage(json: String) { /* … */ }}, "HelpvaneBridge")React Native’s ReactNativeWebView.postMessage is supported too.
5. Links
Section titled “5. Links”Answers can contain links to your pages. Let the WebView load only the chat’s own host, and open every other link in your app (or the browser).
Checklist
Section titled “Checklist”- A guest sees the chat with the sign-in bar; “Sign in” opens the app’s login.
- After logging in, the chat says “Signed in as …” and answers “where is my order?”.
- ✕ closes the screen; the chat history is still there when it is opened again.
- The conversation appears in Conversations with channel
app.