Skip to content

Props reference

AWChatProps is the same shape on web and React Native.

Required

PropTypeDescription
userIdstringYour user id. Maps to Intercom external_id.
sessionTokenstringJWT signed by your server (see Auth).
serverUrlstringAW Chat backend base URL.
telemetryTelemetryDevice/app metadata (below).

Telemetry:

FieldExample
appVersion"6.1.4"
hardwareId"iPhone15,2", "web", "tma"
osVersion"iOS 17.4", "Android 14"
deviceLang"ru", "en"

Optional

PropTypeDefaultDescription
user{ name?, email? }Sets the Intercom contact's name/email (for the operator's view).
theme"light" | "dark""light"Color scheme.
locale"ru" | "en""ru"UI language.
brandColorstring (hex)glacial blueAccent override.
initialRoute"hub" | "chat" | "ticket""hub"Deep-link target.
targetIdstringTicket id for initialRoute: "ticket".
skipWelcomebooleanfalseSkip the branded welcome gate, open the hub directly.
demobooleanfalseMock data, no network (showcase).
fcmTokenstringFCM device token → enables mobile push.
telegramChatIdstringTelegram user id → enables TMA push.
pollingIntervalnumber (ms)4000Base poll cadence.
onSessionExpired() => voidFired on 401 — host should re-auth.
onError(error) => voidGlobal error callback ({ code, message }).

Web-only

PropTypeDefaultDescription
fillbooleantrueFill the host container vs. fixed size.

React Native-only

PropTypeDescription
onPickFiles() => Promise<PickedFile[]>Host-provided native attachment picker. Return { uri, name, type, size }[]. Without it, the attach button is hidden.
tsx
onPickFiles={async () => {
  const r = await ImagePicker.launchImageLibraryAsync();
  return r.canceled ? [] : r.assets.map(a => ({ uri: a.uri, name: a.fileName!, type: a.mimeType!, size: a.fileSize }));
}}

Deep linking

Open straight to a ticket from a push tap:

tsx
<AWChat initialRoute="ticket" targetId="t_12345" skipWelcome /* … */ />

Push payloads include type (chat/ticket) and the id — map those to initialRoute + targetId.

AW Chat SDK — internal integration docs.