03 / Authentication
Authentication
EquilAI has two credentials for two jobs. The website widget identifies itself with your public Bot ID, which lives in the snippet and needs no token. The server-side REST API uses a secret API key you create in the dashboard, and that one belongs on your server only.
How it works
Your Bot ID
Every bot has a unique UUID assigned at creation time. This ID:
- →Identifies which bot to load and chat with
- →Is embedded in the widget script URL
- →Is publicly visible; it is not a secret (unlike the REST API key)
Your Bot ID (example)
Find your real Bot ID in Dashboard → Deployment.
Widget authentication
Snippet
For the widget embed, authentication is implicit: your Bot ID is part of the script URL. No extra configuration is needed, and the widget handles every call it makes from there on its own.
REST API authentication
Server-side API key
The server-side REST API uses a secret API key instead of the Bot ID. Create one in Dashboard → API, then send it in the JSON body as apiKey. Unlike the Bot ID, this key is a secret: keep it on your server and never expose it in client-side code. See the API reference →
Security
Domain restrictions
Because the Bot ID is public, the widget's requests are also validated by origin domain. You control which sites may embed your bot in Dashboard → Bot → Allowed Domains. The REST API is not domain-restricted; its secret key is the credential.
What this means in practice:
- →The widget refuses to run on unlisted domains, with a
403 - →Add your production domain and any staging domains in the dashboard
- →An empty list blocks all external origins until you add your domains; add * only if you explicitly want any site to embed your bot
Ready to start integrating? See the REST API →