- The publishable key identifies your workspace to the chat runtime. It ships in your app and is not a secret.
- End-user identity tells Chatropic who is chatting, so conversations land in Inbox under the right person and authenticated actions run against the right account.
Publishable keys
Copy the key from Deploy > Mobile app > Embed or Deploy > Chat widget > Embed in the dashboard. Keys look likecpk_live_<random> and are scoped to widget runtime calls only: chat, history, feedback, and voice. They cannot read or modify workspace configuration.
https://chatropic.com/embed/key/{publishable-key}.
Workspace API keys (managed under Deploy > API keys) are server credentials. Never embed them in a mobile app or web page.
Signed-in user identity
When your app knows who is logged in, pass user props so Chatropic can associate the conversation with that person:Proving identity with a signed token
For actions that touch real user data, an attacker should not be able to impersonate another user by editingendUserId in a modified client. To prevent that, pass an identityToken: a JWT that your backend signs with the workspace identity signing secret, generated under Actions > Manage tokens when you configure a customer-login token.
Sign the JWT on your backend with HS256. The sub claim must match the endUserId you pass to the SDK:
Agent BFF pattern for signed-in apps
When your API actions call your own backend, prefer a static service token plusendUserId over forwarding the user’s own bearer token into chat:
- In Actions > Manage tokens, create a Static value token (for example
my_bff). - Point actions at your backend with
Authorization: Bearer {{token.my_bff}}andX-End-User-Id: {{end_user_id}}headers. - Mount the widget with
endUserId={user.id}so the header resolves to the signed-in user.
React Native SDK
Where these props fit in a full integration.
Error handling
What users see when identity or actions fail.