- Store credentials once under Manage tokens
- Reference tokens in HTTP action headers with
@(inserts{{token.<name>}}) - Support static value (server secrets), customer login (per-user OAuth), and the agent BFF pattern (static service token +
{{end_user_id}})
Open Manage tokens
From Available actions, click Manage tokens, or go directly to Actions > Manage tokens in the sidebar.1
Create a token
Click New token, choose a type, and save. Token names must start with a letter and use lowercase letters, numbers, and underscores only (e.g.
my_api).2
Reference in an action
On an HTTP action’s Headers field, type
@ to open the token picker. The selected token is inserted as {{token.<name>}}.3
Test the action
Use the action test panel. Resolved token values are never shown; headers appear censored in logs.
Token types
When you click New token, choose Retrieve token from:Static value tokens
Use for backend credentials your agent always sends (e.g.Authorization: Bearer ... for your internal API or agent BFF).
Agent BFF (signed-in apps)
For mobile and web apps where users already sign in to your product, you usually should not pass their API bearer token through chat. Instead:- Create a static value token (e.g.
my_bff) with a shared secret your backend validates. - Point HTTP actions at your app’s agent BFF routes (not the customer’s API directly).
- Send the signed-in user id on every action call:
See Fintech SaaS recipe and Pricepally ecommerce recipe for full BFF walkthroughs.
{{end_user_id}} resolves to the stable id you pass from the embed or SDK. Without it, Chatropic falls back to the anonymous chat session id, and BFF routes will not find the correct user.Customer login tokens
Use when the external API must act on behalf of the signed-in customer (orders, account data, etc.). Configure:
When a customer has not signed in, the agent returns a sign-in prompt instead of calling the API. After OAuth completes, subsequent turns use the stored per-user token.
Identity signing secret (customer login)
Customer login requires your embed or SDK integration to pass a stable end-user id so OAuth tokens persist across chat sessions.- In the customer-login token dialog, generate an identity signing secret (shown once).
- On your backend, sign a short-lived JWT with
HS256, includingsub(end-user id) andexp. - Pass the JWT and the end-user id to your integration:
identityTokenandendUserIdin the React Native SDK, or theidentityandendUserquery params on the web embed URL.
Syntax reference
Skills
Configure webhook steps and headers.
Authentication & identity
Pass
endUserId and identityToken from your app.