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
- On the API keys & tokens page, click Request a secondary token. It works next to the primary one.
- 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. - 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
- Twilio Help: How to find your Auth Token and how to change it
- Twilio API: Auth Token
- Twilio API: Secondary Auth Token
- Twilio: Security
- twilio-python: reads TWILIO_AUTH_TOKEN
- twilio-node: reads TWILIO_AUTH_TOKEN
- twilio-go: reads TWILIO_AUTH_TOKEN
- twilio-java: reads TWILIO_AUTH_TOKEN
- twilio-php: reads TWILIO_AUTH_TOKEN