Creating a Twilio API key
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: API keys overview, Create API keys in Twilio Console, and Key resource (v1). Retrieved 2026-07-03.
Twilio recommends API keys over the Account SID/Auth Token for production. An API key is a SID + secret pair used as HTTP Basic credentials: the key SID (starts with SK) is the username and the secret is the password. You still need your Account SID (starts with AC) because it is a path segment in REST URLs.
- Log in to the Twilio Console and navigate to Settings > Account settings > API keys & auth tokens.
- From the region selector, select your region, then click Create API key.
- Enter the API key name and select the key type:
- Main — full access to all Twilio API resources (equivalent to the Account SID/Auth Token; Console-only).
- Standard — access to all resources except the Accounts and Keys resources.
- Restricted — customized, fine-grained access to specific resources (permissions selected on creation).
- For restricted keys, under Permissions, select the permissions to grant, then click Next.
- Copy the secret and store it somewhere secure — Twilio “returns the secret field only when the API key is first created and never includes the secret field when you fetch the resource.” If you lose it, delete the key and create a new one.
- Select the Got it! checkbox and click Finish.
Verify the key (works with Main keys; a 200 lists the accessible account):
curl -G https://api.twilio.com/2010-04-01/Accounts \ -u $YOUR_API_KEY:$YOUR_API_KEY_SECRETOperational notes:
- The key SID matches
^SK[0-9a-fA-F]{32}$(34 characters). - Standard and Restricted keys cannot read the Accounts or Keys resources, so verify those against a permitted product subresource (for example
GET /2010-04-01/Accounts/{AccountSid}/Messages.json). - Provide your Account SID (
AC...) as connection config so the runtime can build request URLs.
Connect it to Publicus
Section titled “Connect it to Publicus”Open Connections under Credentials, choose Twilio, and pick Twilio API key (SID and secret). 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.