You can create and manage all of your API keys in the Twilio Console. To create and manage API keys using the REST API, refer to Key resource v1.
API keys represent the required credentials that you'll use to authenticate to Twilio's REST API and to create and revoke Access Tokens.
If your API key requires access to the /Accounts
or /Accounts/{SID}/Keys
endpoints, then you'll need to use a Main key. You can create Main keys only in the Twilio Console.
The API key types are: Main, Standard, and Restricted (public beta, Key resource v1 only). The following table describes each type.
Key type | Access permissions | Create in Console | Create with REST API |
---|---|---|---|
Main | Full access to all Twilio API resources. Equivalent to using your Account SID and Auth Token for API requests. | Yes | No |
Standard | Access to all Twilio API resources, except for API key and Account resources. | Yes | Yes |
Restricted | Customized, fine-grained access to specific Twilio API resources. Learn more about Restricted API keys. | Yes | Yes (v1 only) |
Restricted API keys can have complex permissions. You can save time by duplicating a Restricted API key as a starting point for a new key.
For Standard and Main API keys, you can update only the Friendly name. For Restricted keys, you can update the Friendly name and the Permissions.
If you no longer use an API key or if a key has been compromised, then you can revoke the key's permissions by deleting the API key.