Authentication
Every request needs a bearer token. You copy it from your logged-in admin session.
Base URL
Section titled “Base URL”https://chatbot-engine.amio.ioGet a token
Section titled “Get a token”- Log in to admin.amio.io.
- Open DevTools and go to Application → Local Storage →
https://admin.amio.io. - Copy the value of
access_token.
You can also run localStorage.access_token in the browser console.
Send the token
Section titled “Send the token”Add it as a bearer token in the Authorization header:
export AMIO_TOKEN="<paste token here>"
curl https://chatbot-engine.amio.io/bots \ -H "Authorization: Bearer $AMIO_TOKEN"A successful call returns a JSON array of your bots. Requests only see data from the organization your account belongs to.
Expiry
Section titled “Expiry”The token expires. The expires_at key in the same Local Storage is a Unix timestamp in milliseconds. To check it in the console:
new Date(Number(localStorage.expires_at))When the API returns 401, log in to the admin again if needed and copy a fresh access_token. A missing header returns Missing header "Authorization". and an invalid or expired token returns Wrong authorization.