Authentication
Four credentials, for four different callers. Using the wrong one does not half-work — it is refused.
Which credential for which caller
| Publishable key — tb_… | For the browser. Sent as X-API-Key. Public by design: it ships in the source of a public web page, so anyone can read it. What protects it is your allowed domains, not its secrecy. |
|---|---|
| Server key — tb_live_… | For your backend. Sent as Authorization: Bearer (or X-API-Key). Reaches every agent in one App, limited to the scopes you granted. Created on the API keys page; shown once. |
| Integration key + secret — tb_srv_… / tbsrv_… | For a helpdesk answering one agent's handoffs. Sent as X-Integration-Key and X-Integration-Secret, always together. The secret is shown once and stored as a hash. |
| Dashboard session | You, signed in. An httpOnly cookie the browser sends for you; never something to copy into code. Sensitive changes — minting a server key, changing your account email — ask for your password or a two-factor code again. |
How long a dashboard session lasts
| The access token | One hour. It is renewed in the background while you work, so you are not asked to sign in again — a stolen one is useful for an hour at most. |
|---|---|
| A password reset | Signs you out everywhere: every browser and device holding a session has to sign in again with the new password. |
| A reused refresh token | Treated as theft. Each renewal hands out a new refresh token; if an old one is presented again, every session for that account is ended. |
NoteWhy the widget key is not a secret
The browser: publishable key plus an allowed domain
curl https://api.tigerbase.cloud/chatbots/public/config \
-H "X-API-Key: tb_your_publishable_key" \
-H "Origin: https://clinic.example"With no key at all you get a refusal that names the header, rather than a generic 401:
{
"message": "API key required. Provide it as the X-API-Key header.",
"error": "Unauthorized",
"statusCode": 401
}Allowed domains, exactly
This is the control that actually protects the publishable key, so it is worth knowing precisely how it matches. All of the following was measured against a running agent, not inferred.
| An entry of clinic.example | Allows clinic.example. Nothing else. |
|---|---|
| www.clinic.example | Refused by that entry. A bare host does not cover its subdomains — this is the single most common surprise. |
| An entry of *.clinic.example | Allows www.clinic.example and booking.clinic.example. Add it alongside the bare host, not instead of it. |
| clinic.example.attacker.com | Refused, even with the wildcard. The match is on the domain, not on how the text ends. |
| An entry written as a full URL | Accepted. https://clinic.example/some/path is read as the host clinic.example; the path is ignored. |
| localhost and 127.0.0.1 | Refused in production unless they are on the list. Add localhost as an entry to test a local page against the live service; only a development server lets local pages through on its own. |
| No Origin or Referer at all | Refused in production once the list has entries. A browser always sends one; a request without it is not the caller this check is for. |
A domain you did not allow is refused with a sentence written for the visitor, and a reason written for code:
{
"message": "This assistant is not available right now.",
"error": "Forbidden",
"statusCode": 403,
"reason": "domain_not_allowed"
}| no_domains_configured | The agent's list is empty. |
|---|---|
| domain_not_allowed | The page's host is not on the list. |
| no_origin | The request carried neither Origin nor Referer. |
The response never names the host that was turned away — that goes to the account owner as a notification, so the page that was refused learns nothing about how the account is set up.
WarningAn empty list is refused in production
reason: "no_domains_configured". In development an empty list is permitted, which is why an agent can appear to work locally and then refuse the moment it is deployed.Your backend: a server key
The general-purpose credential for server-to-server work: reading conversations and usage, asking an agent, changing settings, answering the handoff queue. Scoped, revocable, and one per integration — see API keys and Keys & scopes.
curl https://api.tigerbase.cloud/v1/agents \
-H "Authorization: Bearer tb_live_…"TipWhat a server key cannot do, by design
Your helpdesk: integration key and secret together
Generated from the agent's Settings page. The response is the only time you will see the secret:
{
"integrationKey": "tb_srv_15d718533c1d962c458d65b896a607cc…",
"integrationSecret": "tbsrv_2d67aa22a7aa23ecb6d9c9cdab187a98…",
"warning": "IMPORTANT: Save the integrationSecret now! It will NOT be shown again."
}curl https://api.tigerbase.cloud/integrations/handoff/conversations \
-H "X-Integration-Key: tb_srv_…" \
-H "X-Integration-Secret: tbsrv_…"No Origin header is needed or expected on either server path. Server-to-server calls never send one, and the domain allowlist does not apply to them.
NoteWhich server credential should I use?
What happens if you mix them up
Every one of these was run against the live API. None of them half-works, which is the point:
| Integration key with no secret | 401 — “Integration credentials required. Provide X-Integration-Key and X-Integration-Secret.” |
|---|---|
| A wrong secret | 401 — “Invalid integration credentials”. |
| Your publishable key on the integration API | 401. It is not accepted there under any circumstances. |
| Your integration key on the widget endpoint | 401 — “Invalid API key”. The two key spaces do not overlap. |
| Anything but a tb_live_ key on /v1 | 401 — “That API key is not valid, has been revoked, or has expired.” |
NoteRotating, and what it breaks
CarefulIf a secret leaks, revoke or rotate it
read reads every conversation in its App. Both include whatever your visitors typed. A leaked publishable key is a much smaller matter — tighten the allowed domains and it is worth nothing on any other site.