Skip to content
Docs

Finding your Twilio Account SID and Auth Token

This guide is part of the Publicus connection catalog. Once you have the credentials, connect the service and Publicus stores them for you.

Distilled from Twilio’s own documentation: Making requests to Twilio, REST API: Credentials, and REST API: Auth Token. Retrieved 2026-07-03.

Twilio authenticates REST requests with HTTP Basic auth. With this auth system, the Account SID is the username and the Auth Token is the password. Twilio recommends this only for local testing — use an API key for production, because “if a bad actor gains access to your Account SID and Auth Token, then your Twilio Account is compromised.”

  1. Log in to the Twilio Console.
  2. On the Console dashboard, locate Account Info. Copy the Account SID — it starts with AC and is 34 characters long (a two-letter prefix plus 32 hexadecimal digits).
  3. In the same Account Info panel, reveal and copy the Auth Token. Keep it secret; treat it like a password.
  4. Store both values as environment variables before sharing code or deploying — Twilio advises: “Always store your credentials in environment variables before sharing any code or deploying to production.”

Verify the pair with the documented example (a 200 lists the accessible account):

Terminal window
curl -G https://api.twilio.com/2010-04-01/Accounts \
-u $YOUR_ACCOUNT_SID:$YOUR_AUTH_TOKEN

Operational notes:

  • The Account SID is also a path segment in REST URLs (/2010-04-01/Accounts/{AccountSid}/...), so you need it even when you later switch to API-key auth.
  • Twilio supports a secondary Auth Token for zero-downtime rotation: create a secondary token, update your apps, then POST https://accounts.twilio.com/v1/AuthTokens/Promote to promote it to primary (this deletes the old primary). Allow up to a minute for propagation, or Functions/Services may return 403 Forbidden.

Open Connections under Credentials, choose Twilio, and pick Twilio Account SID and Auth Token. Publicus asks for exactly the fields listed above and keeps them in your workspace’s secret storage.

See also: Twilio in the catalog.

This guide is maintained by Publicus and published under CC BY 4.0.