Skip to main content

Mobile SDKs (React Native & Flutter)

Put the Orki chat inside your mobile app. Both SDKs host the same chat experience your web visitors get, with a native bridge for authenticated identity, lifecycle events, and a push-token seam.

PlatformPackage
React Native@orki/webchat-react-native
Flutterorki_webchat

React Native​

npm install @orki/webchat-react-native react-native-webview
import { useRef } from 'react';
import { OrkiWebchat, OrkiWebchatHandle } from '@orki/webchat-react-native';

function SupportScreen({ orkiUserJwt }) {
const chat = useRef<OrkiWebchatHandle>(null);
return (
<OrkiWebchat
ref={chat}
baseUrl="https://app.orki.ai"
tenantId="YOUR_TENANT_ID"
integrationId="YOUR_INTEGRATION_ID"
language="en"
userJwt={orkiUserJwt}
onEvent={(e) => {
if (e.type === 'auth-required') {
// fetch a fresh JWT from YOUR backend, then:
// chat.current?.updateToken(freshJwt)
}
}}
/>
);
}

Flutter​

dependencies:
orki_webchat: ^0.1.0
final controller = OrkiWebchatController();

OrkiWebchatWidget(
baseUrl: 'https://app.orki.ai',
tenantId: 'YOUR_TENANT_ID',
integrationId: 'YOUR_INTEGRATION_ID',
language: 'en',
userJwt: orkiUserJwt,
controller: controller,
onEvent: (event) {
if (event.type == 'auth-required') {
// fetch a fresh JWT from YOUR backend, then: controller.updateToken(freshJwt)
}
},
)

Shared surface​

Both SDKs expose the same operations:

OperationPurpose
setUser(jwt)Set/replace the visitor identity (tenant-signed JWT, minted on your server)
updateToken(jwt)Refresh the JWT in place — no widget reload, the conversation continues
logout()Clear the widget identity + stored session when the user signs out of your app
setPushToken(token)Capture seam — push delivery ships later; wiring it now keeps you ready
eventsready, auth-required, user-set, auth-error, message (unread count), navigate

Anonymous mode​

Works out of the box: the widget runs its bot check inside the WebView. Keep JavaScript and DOM storage enabled (both SDKs do this by default).

Building your own UI instead?​

Use the Customer Chat API with @orki/chat-core (JS/TS) or the OrkiChatClient class that ships inside orki_webchat (Dart).