API Keys
Use API keys to authenticate CLI, CI, and programmatic API requests.
Create an API key
- Open Profile → API Keys in the TesterArmy dashboard.
- Click Create API Key.
- Copy the key and store it in your secret manager or CI environment.
API keys are shown once. If you lose a key, revoke it and create a new one.
Bearer token format
Send the key in the Authorization header:
For the CLI, either run ta auth or set:
Agent tokens
An AI agent that cannot use the dashboard can authenticate without an API key by
following https://tester.army/auth.md: it registers
an identity with WorkOS, you approve it once by signing in and reading back the
code shown on the claim page, and it exchanges the result for a short-lived access
token. That token is sent in the same Authorization: Bearer header and acts as
you, on your team.
Use an API key instead when the caller is CI, the CLI, or a user who belongs to more than one team — an agent token has no way to say which team it means.
Troubleshooting
401 Unauthorized
The API key is missing, malformed, revoked, or belongs to a user who no longer has access to the team.
Check that:
- The header is exactly
Authorization: Bearer YOUR_KEY. - The key comes from Profile → API Keys.
- The key has not been revoked.
- The user who created the key still belongs to the team.
Rotate a key
- Create a new key.
- Update your CLI, CI, or secret manager.
- Confirm requests work with the new key.
- Revoke the old key.
