For a complete guided integration, use the install prompt — it
walks the whole flow including the questions to ask the developer. This page is
the distilled rule set to keep in context while you work.
The rules
-
The
pk_live_…key is publishable — safe to ship in the app binary. It only authorizes a fresh install to register a device; it cannot read tickets or impersonate users. There is no secret key to hide, noappIdparameter, and no server-side environment variable — the key encodes the app. Do not move it to a backend, do not build a key-proxy endpoint. -
Never build auth for ClarioDesk. There are no JWTs, no refresh tokens,
no session endpoints. The SDK generates a non-extractable hardware-backed
device key on first launch and signs every request with it
(device-is-identity — see Authentication).
identify({ externalId, email, traits })is metadata only and grants no access. -
Call
identify()on every app launch for logged-in users, hydrated from the app’s persisted session — not only in the login flow. Users who were already signed in before the SDK was added never pass through login again; a login-only hook leaves them unlabeled.identify()is idempotent, so repeated calls are correct, not wasteful. See Identity lifecycle. -
reset()on logout; never rebind a device. Account switch =reset()→init()→identify(). Each device row carries an independent ticket history — rebinding one device across users is always wrong. -
Two modes, one install — don’t mix them. Either the prebuilt UI
(Flutter:
ClarioDesk.openInbox(context); React Native:@clariodesk/react-native/ui) owns the support screens, or the app’s custom screens built on the headless API do. Don’t hand-roll one screen inside the prebuilt flow. -
React Native:
import 'react-native-get-random-values'must be the first import in the entry file — before any other import, or key generation fails at runtime. -
Push is a separate package on purpose. React Native push lives in
@clariodesk/react-native-pushbecause Firebase’s native code autolinks into every host that installs it — never add it (or any@react-native-firebase/*package) to an app that didn’t opt into push. Flutter receives FCM tokens through thePushTokenProviderseam; the SDK never importsfirebase_messaging. -
Expo Go is an evaluation lane, not a shipping lane. The SDK
transparently falls back to a software P-256 key there (no native modules)
and remote push is unavailable. Everything else works. Recommend a dev
build (
npx expo prebuild && npx expo run:ios) before release. -
Attachments need iOS usage strings. Enabling the picker means the host
app must declare
NSPhotoLibraryUsageDescription(plus camera/microphone variants if capture is enabled) in Info.plist. -
Never guess an API name. The full surface is small and documented —
Flutter: API reference; React Native:
API reference. Machine-readable index:
llms.txt/llms-full.txt; any page is fetchable as markdown by appending.mdto its URL. If the ClarioDesk docs MCP server is connected (https://docs.clariodesk.com/mcp— see Install with AI), prefer itssearch_clario_desktool over web fetches.
Quick facts
Integration flow
Detect the stack → ask the developer the four decisions (prebuilt vs. custom UI, entry point, push, attachments) → install →init + identify wiring →
UI → verify by round-tripping a real message to the dashboard inbox. The
install prompt encodes this flow end to end.