Keys / Axiom
AXIOM_TOKEN
The Axiom API token your app sends events and runs queries with. A basic token can only ingest into the datasets you pick.
- Starts with
xaat-- Expires
- you choose, or never
- API
- create, list, regenerate and delete, with a token that can manage API tokens
Get it
Create one on app.axiom.co/settings/api-tokens. The steps aren't recorded yet.
Set it
AXIOM_TOKEN=xaat-...
The Go and Python SDKs read it from this variable when you don't pass a token. The JavaScript SDK doesn't. Or keep it out of .env with keypin: keypin run -- npm run dev
Replace it
- Under Settings > API tokens, select the token and click Regenerate token. With the API, set when the old token stops working.
- Deploy the new token everywhere that reads
AXIOM_TOKEN. - Check that events still arrive, then let the old token expire or delete it.
Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.