Troubleshooting
The chat won’t start from my page or app
The publishable key is refused when:
- The origin or app id isn’t listed. On the app’s Install screen, add the page’s exact
origin (scheme, host and port:
https://shop.example.com, not a path) or the mobile app’s package or bundle id. - The app isn’t live. Switch it from Test to Live. Going live needs at least one origin or app id.
- The key is wrong. Copy it again from the Install screen; it starts with
pk_.
If the Install screen still shows Waiting for the first chat…, the SDK hasn’t reached Rafiq yet: check the browser’s console or the app’s log for the refused request.
Guests get a 429
A guest has reached the daily limit: 20 conversations a day in test mode, or the guest cap you set for a live app. Sign your users in (signed-in people aren’t held to the guest cap), or raise the cap on the Install screen.
The userToken is rejected
The chat falls back to asking the person to sign in again. Check the token your server signs:
- The signature. HS256, with the app’s identity secret, not a server key or another app’s secret. If you made a new identity secret, your server must use the new one.
- The expiry.
expmust be in the future and at most 24 hours ahead. - The claims.
subis required;nameis optional.
The chat talks but won’t change anything
The person is a guest. Guests can’t run server or MCP actions that change data or read a person’s
data. Pass a userToken for the signed-in person.
An action fails
Open the conversation in Conversations (filter by failed action): it lists every call the conversation made, in order, with what came back. Then:
- Your app’s own calls run in the page or app with the person’s session: check they are signed in to your app, and that the SDK’s API base points at your API.
- A server API or MCP server runs from Rafiq: check its address and its credentials on the Actions screen.
- The Dashboard shows each action’s success rate and p95 time, so you can see whether it fails every time or only sometimes.
Messages arrive late in the app
The chat streams new turns, and falls back to polling when the stream is refused or keeps dropping. Each turn shows once, whichever way it arrives.