Skip to main content
Find your project’s chat URL and setup snippets in the App integration in the platform.

App audiences

Create an audience with Channel Type set to is one of → App. Use it to provide app users with specific guidance, knowledge, and tool access. Combine the App condition with customer attributes, such as their subscription plan, to tailor support further. Your app can pass these attributes through the SDK’s user.data command.

Web SDK through a JavaScript bridge

Your native app can use the Web SDK through the WebView’s JavaScript bridge. When you load the App chat URL directly, call window.$botbrains inside the WebView to: Run commands once window.$botbrains is available and use .push() to queue them while the chat loads. In React Native, use injectJavaScript to call SDK commands. To forward SDK events back to your app, use window.ReactNativeWebView.postMessage and handle them with onMessage. See the React Native WebView bridge guide and SDK events.

Voice and microphone permissions

For voice, request the app’s microphone permission when the user starts the feature. In React Native:
  • iOS: Add a localized NSMicrophoneUsageDescription to Info.plist. Set mediaCapturePermissionGrantType="grantIfSameHostElseDeny" on the BotBrains WebView to avoid the additional website prompt after native permission is granted. Keep this WebView restricted to https://chat.botbrains.io; the setting trusts its current host.
  • Android: Declare android.permission.RECORD_AUDIO and request it at runtime using your permission library or PermissionsAndroid. React Native WebView handles web audio permission requests; custom native handlers must check the requesting origin and grant only audio capture. See PermissionRequest. Android controls the system prompt’s wording; put custom explanations in your app UI.
These changes require a native app build. Test permission approval, denial, and repeat voice sessions on both platforms; keep text chat available if microphone access is denied.