Keys / DataStax Astra DB

ASTRA_DB_APPLICATION_TOKEN

The Astra application token your app connects to Astra DB and calls the Data and DevOps APIs with.

Starts with
AstraCS:
Expires
never by default; you can set a lifetime
API
create, list and delete, with the DevOps API

Get it

Create one on astra.datastax.com. The steps aren't recorded yet.

Set it

ASTRA_DB_APPLICATION_TOKEN=AstraCS:...

LangChain's langchain-astradb and the astrapy REPL read it when you don't pass a token. The astrapy client doesn't; your app passes it in as token. Or keep it out of .env with keypin: keypin run -- npm run dev

Replace it

  1. In Settings > Tokens, generate a new token with the same role. You can't change a token's role later. It's shown only once.
  2. Deploy it everywhere that reads ASTRA_DB_APPLICATION_TOKEN.
  3. Check that nothing still uses the old token, then delete it under Manage existing tokens, or with DELETE /v2/tokens/<client-id>.

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.

Sources, checked 2026-11-16