Keys / Twilio

TWILIO_AUTH_TOKEN

The Auth Token your app calls the Twilio API with, together with TWILIO_ACCOUNT_SID. It also checks Twilio's webhook signatures.

Expires
no expiry setting
API
create and delete a secondary token, and promote it, with the Account SID and Auth Token

Get it

Create one on console.twilio.com/us1/account/keys-credentials/api-keys. The steps aren't recorded yet.

Set it

TWILIO_AUTH_TOKEN=...

The Python, Node.js, Go, Java and PHP SDKs read it from this variable when you don't pass a token. Or keep it out of .env with keypin: keypin run -- npm run dev

Replace it

  1. On the API keys & tokens page, click Request a secondary token. It works next to the primary one.
  2. Deploy it everywhere that calls the API with TWILIO_AUTH_TOKEN. Webhook signatures still use the primary token, so switch webhook checks when you promote.
  3. Check that nothing still uses the old token, then click Promote to Primary. The old token stops working at once.

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