Send a token in the Authorization header of every authenticated request:
GET https://api.continuous-translations.com/auth/me
Authorization: Bearer <token>A token is either a session token or an API key.
Session tokens #
A session token comes from POST /auth/login and is valid for 7 days. Your organisation’s session timeout can end it earlier. Session tokens can use every route of the API.
API keys #
API keys start with ct_live_ and are created under /account/api-keys. They are meant for CI and other automation.
An API key only reaches routes that accept one of its scopes:
| Scope | Allows |
|---|---|
projects:read | Reading projects |
keys:write | Creating and changing keys |
translations:read | Reading translations |
translations:write | Writing translations |
Project keys #
A key can also be tied to one project. Create it under Project settings → CI & CLI. It then sees nothing else, which makes it the right choice for a pipeline. The CLI uses these keys.
Treat API keys like passwords. Store them as secrets in your CI system and never commit them to your repository.
Routes that are not part of the CLI and CI flow accept session tokens only. See Endpoints.