> ## Documentation Index
> Fetch the complete documentation index at: https://docs.botbrains.io/llms.txt
> Use this file to discover all available pages before exploring further.

# App Integration

> Embed your chatbot in a mobile app and identify App conversations

Use a WebView to display your chatbot inside an iOS or Android app. In the platform, open **Channels → App** and copy your project's chat URL or integration snippet.

App and Website use the same [frame](/concepts/frames) and deployment alias. Appearance changes and published AI versions apply to both.

## Chat URL

```text theme={null}
https://chat.botbrains.io/loader?frameId=YOUR_FRAME_ID&mode=fullscreen_headerless&channel=app
```

Replace `YOUR_FRAME_ID` with the frame ID from Channels. The `channel=app` parameter identifies messages sent from the app. Without it, the channel defaults to **Browser**. The marker is a source label, not customer authentication.

## React Native

Install `react-native-webview`, then load the URL directly:

```tsx theme={null}
import { WebView } from 'react-native-webview';

export default function ChatScreen() {
  return (
    <WebView
      source={{
        uri: 'https://chat.botbrains.io/loader?frameId=YOUR_FRAME_ID&mode=fullscreen_headerless&channel=app',
      }}
      style={{ flex: 1 }}
    />
  );
}
```

## HTML iframe

If your app uses an HTML wrapper, include the marker on the iframe URL. Give the parent container a height so the chat has room to render.

```html theme={null}
<iframe
  src="https://chat.botbrains.io/loader?frameId=YOUR_FRAME_ID&mode=fullscreen_headerless&channel=app"
  style="width: 100%; height: 100%; border: 0;"
  allow="clipboard-write"
  title="Chat"
></iframe>
```

## Audiences and analytics

* Select **App** in the channel filter to view App conversations and their analytics. App conversations are included in the **Chat** analytics tab.
* In an [audience](/concepts/audiences), set **Channel Type** or **Integration Type** to **App** to target app users.
* A conversation's channel follows its latest customer message. Continuing a Browser conversation in App changes its channel to App; replying again in Browser changes it back. Opening the chat or background syncing does not change the channel.
* Analytics and conversation filters use that current channel for the whole conversation, including its earlier messages.
* Legacy conversations default to Browser until their next customer message.

## Shared identity and conversation history

Use the same frame and identify the logged-in customer with the same stable external ID in both App and Website using [`user.identify`](/concepts/web-sdk#identify). Provide the external ID signature when your user pool requires signed identities. Channel selection does not change the customer identity or restrict their conversation history.

Anonymous Browser and App visitors cannot be matched across separate devices or storage. Call `user.logout` when the customer logs out or switches accounts.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.