twilio-iam-auth-setup

Configure Twilio Auth Tokens, API keys, and Access Tokens for API authentication.

5.3k|765|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/openai/plugins --skill twilio-iam-auth-setup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: twilio-iam-auth-setup
Source: https://github.com/openai/plugins/tree/main/plugins/twilio-developer-kit/skills/twilio-iam-auth-setup
Command: npx skills add https://github.com/openai/plugins --skill twilio-iam-auth-setup

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires twilio.

What problem does it solve?

Choosing and configuring the right Twilio authentication method is confusing, and using the wrong credential type can expose your entire account or break production integrations. This Skill guides you through Auth Tokens, API Keys (Standard, Main, Restricted), test credentials, and Access Tokens so every Twilio API call uses the appropriate, least-privilege credential.

Core Features & Use Cases

  • Credential Selection Guidance: Compares Auth Token vs. Standard, Restricted, and Main API Keys with clear recommendations for prototyping versus production.
  • Restricted API Key Creation: Shows how to create fine-grained keys via the v1 IAM API with permission patterns for Messages, Calls, and Verify.
  • Access Token Generation: Generates short-lived JWTs with Voice, Video, Chat, and Sync grants for browser and mobile SDKs.
  • Rotation and Test Credentials: Covers Auth Token rotation via secondary token promotion and magic test numbers for charge-free development.
  • Use Case: You are deploying a Node.js app that sends SMS in production. Use this Skill to create a Standard API Key, configure environment variables, and initialize the Twilio client without exposing your Auth Token.

Quick Start

Set up a Twilio Standard API Key for my production app and show me how to initialize the Python client with it.

Frequently Asked Questions about twilio-iam-auth-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Twilio API key for production?

Create a Standard API key in the Twilio Console under Account > API keys & tokens, then copy the key SID (SK...) and secret, which is shown only once. Initialize the client with the API key, secret, and Account SID as the third argument.

Twilio Auth Token vs API key: which should I use?

Use the Auth Token only for local prototyping since it grants full account access. Use a Standard API Key in production because it is revocable and cannot access /Accounts or /Keys endpoints, limiting damage if leaked.

How do I create a restricted Twilio API key?

Create restricted keys via the v1 IAM API using client.iam.v1.api_key.create with key_type restricted and a policy of allowed resource paths. The v2010 /Keys.json endpoint silently ignores restricted parameters and creates a standard key instead.

Can Twilio API keys be rotated?

No, Twilio API keys cannot be rotated. If a key is compromised, create a new key, update your application, then delete the old key via the Console or client.keys(key_sid).delete().

Why does my Twilio Standard API key return error 20003?

Error 20003 occurs because Standard keys cannot access /Accounts or /Keys endpoints. Use the Auth Token or a Main API Key for account management operations instead.

How do I test Twilio API calls without charges?

Use test credentials from the Console with magic numbers like +15005550006 for valid numbers. Test credentials work only with Messages, Calls, IncomingPhoneNumbers, and Lookups endpoints; all others return 403.