Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

Create API keys in Twilio Console


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.

(information)

Info

If your API key requires access to the Accounts (/Accounts) or Keys (/Accounts/{SID}/Keys, /v1/Keys) endpoints, then you'll need to use a Main key. You can create Main keys only in the Twilio Console(link takes you to an external page).


Types of keys

types-of-keys page anchor

The API key types are Main, Standard, and Restricted (Key resource v1 only). The following table describes each type:

Key typeAccess permissionsCreate in ConsoleCreate with REST API
MainFull access to all Twilio API resources. Equivalent to using your Account SID and Auth Token for API requests.YesNo
StandardAccess to all Twilio API resources, except for Accounts (/Accounts) or Keys (/Accounts/{SID}/Keys, /v1/Keys) resources.YesYes
RestrictedCustomized, fine-grained access to specific Twilio API resources. Learn more about Restricted API keys.YesYes (v1 only)

Create an API key in Twilio Console

create-an-api-key-in-twilio-console page anchor
Twilio ConsoleLegacy Console
  1. Log in to Twilio Console(link takes you to an external page) and navigate to Settings > Account settings > API keys & auth tokens(link takes you to an external page).

  2. From the region selector, select your region, then click Create API key.

  3. On the API key details page, enter the API key name and select the key type: Standard or Restricted

    • For standard keys, click Next.
    • For restricted keys, under Permissions, select the permissions to grant to the API key, then click Next.

    The API key is created and the secret is displayed.

  4. Copy the secret and store it somewhere secure.

  5. Select the Got it! checkbox and click Finish.


Duplicate a Restricted API key in the Twilio Console

duplicate-a-restricted-api-key-in-the-twilio-console page anchor

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.

Twilio ConsoleLegacy Console
  1. Log in to Twilio Console(link takes you to an external page) and navigate to Settings > Account settings > API keys & auth tokens(link takes you to an external page).
  2. On the API keys tab, click the name of the Restricted API key that you want to duplicate.
  3. Click Duplicate this key.
  4. On the API key details page, enter the API key name and adjust the permissions as needed.
  5. Click Next.
    The API key is created and the secret is displayed.
  6. Copy the secret and store it somewhere secure.
  7. Select the Got it! checkbox and click Finish.

Update an API key in the Twilio Console

update-an-api-key-in-the-twilio-console page anchor

For Standard and Main API keys, you can update only the API key name. For Restricted keys, you can update the API key name and the permissions.

Twilio ConsoleLegacy Console
  1. Log in to Twilio Console(link takes you to an external page) and navigate to Settings > Account settings > API keys & auth tokens(link takes you to an external page).
  2. On the API keys tab, click the name of the API key to update.
    • To update the API key name, on the API key details tab, click Edit name, update the name, then click Save.
    • To update the permissions for a Restricted key, on the Permissions tab, update the permissions and click Save.

Delete an API key in the Twilio Console

delete-an-api-key-in-the-twilio-console page anchor

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.

Twilio ConsoleLegacy Console
  1. Log in to Twilio Console(link takes you to an external page) and navigate to Settings > Account settings > API keys & auth tokens(link takes you to an external page).
  2. On the API keys tab, click the name of the API key to delete.
  3. Click Delete this key.
  4. In the pop-up, click Delete to confirm deletion.