- Server-side: mint a public client key (
pk_live_…) for your website’s domain. - Browser-side: load the widget JS and hand it the public key.
1. Mint a client key
2. Drop the widget on your page
widget_settings. End-users click it and start talking.
Or: install via npm (React, Next.js, Vite, plain TS)
For React / Next.js / Vite shops who’d rather pin a version and tree-shake than load a CDN bundle, the same widget ships as@kataven/client on npm.
Kataven.init shape as the script-tag flow — the only difference is where the bundle comes from. Use the npm path when you want pinned versions, TypeScript types in your IDE, or tree-shaking. Use the script-tag CDN when you want zero build setup (Webflow, WordPress, Squarespace, Shopify, plain HTML).
3. (Optional) Authenticated end-users
If your agent’sauth_mode is user or both, you can identify
the visitor:
Kataven.init takes care of the exchange call.
Troubleshooting
| Error | Cause |
|---|---|
origin_not_allowed | Page’s Origin header isn’t in the widget key’s domain_allowlist. Add it via widget_keys.update(...). |
widget_disabled_for_agent | The agent’s widget_enabled = false. Toggle in the dashboard or via widget_settings.update_agent. |
guest_not_allowed | The agent only allows authenticated users. Use the user-token flow above. |
client_key_disabled | The key was disabled. Re-enable or rotate. |

