Authentication
All API requests require authentication using a Bearer token.
Creating an API token
- Go to your Account settings
- Navigate to the API tokens section
- Click Create API token
- Give your token a descriptive name
- Copy the token and store it securely - you won't be able to see it again
Using your token
Include your API token in the Authorization header of every request: Authorization: Bearer YOUR_API_TOKEN
Verify your credentials
Use the API root endpoint to check that your token is working. It returns your account slug on success, or a 401 if the token is invalid.
Example request
curl -H "Authorization: Bearer YOUR_API_TOKEN" \
https://api.staging.pro.tito.io/
Example response
{
"account_slug": "{account_slug}"
}
Token security
- Keep your tokens secret. Do not commit them to version control.
- Each token is scoped to a single account.
- You can revoke tokens at any time from your Account settings.
- If you believe a token has been compromised, revoke it immediately and create a new one.