Authentication

Taffrail APIs use Bearer Authentication.

Each API request requires an Authorization header with a Bearer token. A single API key is sufficient for all requests to a given environment. Depending on the deployment scenario, you may be provided multiple API keys — one for each environment.

If you have an Advice Builder account, you can request a new API key yourself or contact us to have one generated for you.

📘

API keys are environment-specific

Your API key for staging will not work in production, and vice versa. Ensure you are using the correct key for the environment you are targeting.

Example

Authorization: Bearer <API_KEY>

Error Response

Requests with a missing or invalid API key return a 401 Unauthorized response:

{
  "error": {
    "status": 401,
    "name": "UnauthorizedError",
    "message": "Invalid or missing API key."
  }
}

You can read more about Bearer Authentication on Swagger.io.