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

Manage Regional API Credentials


Since each Twilio Region operates independently of other Regions, Twilio API credentials are a Region-specific resource. Any given Auth token or API key is only valid for the Twilio Region in which it was created. For example, to make API requests to the IE1 Region, the requests must use an Auth token or API key that was created for the IE1 region. Attempting to use credentials for another Region will result in an authentication failure.

This guide provides instructions for managing Region-specific API credentials using the Twilio Console or REST API.


Manage API credentials using Twilio Console

manage-api-credentials-using-twilio-console page anchor

To find your Auth Token and API Keys for a given Region in Twilio Console:

Twilio Console (Legacy)Legacy Console
  1. Log in to the Twilio Console(link takes you to an external page).
  2. Navigate to Develop > API Keys & creds > API Keys & auth tokens.
  3. Use the Region selector dropdown to switch between Regions.
(warning)

API keys are the preferred authentication method

API Keys are the preferred way to authenticate with Twilio APIs. Use your Auth token only for operations that can't be accomplished with an API key.

Check out the Better Twilio Authentication(link takes you to an external page) blog post to learn more about authentication methods.

To create an API Key, click Create API key. In the Twilio Console, the region your API key belongs to is displayed by a regional badge. Make sure you select the region you wish to create your API key in before creating the API key.

In the legacy Console, click Create API Key, select a desired Region and save.

(warning)

Record your API Key's SID and secret

When you create an API Key, be sure to record the API Key's SID and secret. The secret is only displayed once, when you first create the Key, and cannot be reviewed later.

To change the name of an API Key, click on the name or SID of the key to view the key's details page. Edit the name and save your changes.

To delete an API Key, click on the name or SID of the key to view the key's details page. Delete the key.


Manage API credentials using the Twilio CLI

manage-api-credentials-using-the-twilio-cli page anchor

For instructions on creating and managing regional CLI profiles, see Regional CLI usage.


Manage API credentials using the Twilio REST API

manage-api-credentials-using-the-twilio-rest-api page anchor

As an alternative to managing API credentials using the Console, you can use the REST API's Accounts and Keys resources.

Choose which Region your API requests target by including the target Region name in your requests' hostnames, as described in the guide to using the REST API in non-US1 Regions.

For example, to create an API Key in the IE1 Region, find your account's IE1 Auth Token, and use that credential to make a request to the Keys create endpoint in IE1:

1
curl -u $ACCOUNT_SID:$AUTH_TOKEN \
2
https://api.dublin.ie1.twilio.com/2010-04-01/Accounts/$ACCOUNT_SID/Keys.json \
3
--data-urlencode FriendlyName="ie1 API Key"