How to find your Twilio API Key and Secret Key

Created by Katie Gorham, Modified on Tue, 25 Mar at 4:21 PM by Katie Gorham

Step 1: Log in to the Twilio Console

  1. Go to Twilio's website and log in to your account using your email and password.
  2. Once logged in, you will be directed to the Twilio Console.

Step 2: Locate Your Account SID and Auth Token

  1. In the Twilio Console, look at the Dashboard (this is the default page after logging in).

  2. On the dashboard, you will see your Account SID and Auth Token under the "Project Info" section.

    • Account SID: This is your unique account identifier.
    • Auth Token: This is your secret key used to authenticate API requests.
  3. Important: The Auth Token is sensitive information. Do not share it publicly or expose it in your codebase. Use environment variables or secure storage to keep it safe.

  4. If you need to regenerate your Auth Token (e.g., for security reasons), click the "View" or "Manage" button next to the token and follow the instructions to generate a new one.


Step 3: Create an API Key and Secret (Optional, for Enhanced Security)

If you prefer not to use your Account SID and Auth Token directly, you can create an API Key and Secret Key for more granular control over access to your Twilio account.

  1. In the Twilio Console, navigate to the Settings section by clicking on your account name in the top-right corner and selecting "Settings" or "API Keys & Tokens."
  2. Click on the Create API Key button.
  3. Provide a name for the API Key (e.g., "MyAppKey") to help you identify it later.
  4. Select the desired permissions for the API Key. For example:
    • If you only need to send messages, you can restrict the key to messaging-related permissions.
    • For full access, leave the permissions unrestricted.
  5. After creating the API Key, Twilio will display the API Key SID and Secret Key.
    • API Key SID: This is the identifier for the key.
    • Secret Key: This is the private key used for authentication.
  6. Important: The Secret Key will only be shown once, so make sure to copy and store it securely (e.g., in a password manager or environment variable).

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article