/twilio-developer-kit:twilio-account-setupfrom twilio-developer-kit
Walks through creating a Twilio account, getting credentials, buying a phone number, verifying recipients, SDK setup, first API call, subaccount management, and enabling products like AI Assistants, Conversations, Verify, and WhatsApp.
Ships in twilio-developer-kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Every Twilio skill requires an active Twilio account and credentials. This skill covers the one-time setup steps that are prerequisites for all other Twilio skills.
export TWILIO_ACCOUNT_SID=ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export TWILIO_AUTH_TOKEN=your_auth_token
Buy a phone number at Console > Phone Numbers > Buy a number
Install the SDK and send your first message:
Python
pip install twilio
import os
from twilio.rest import Client
client = Client(os.environ["TWILIO_ACCOUNT_SID"], os.environ["TWILIO_AUTH_TOKEN"])
message = client.messages.create(
to="+15558675310", # must be verified on trial accounts
from_="+15017122661", # your Twilio number
body="Hello from Twilio!"
)
print(f"Sent: {message.sid}")
Node.js
npm install twilio
const twilio = require("twilio");
const client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);
const message = await client.messages.create({
to: "+15558675310", // must be verified on trial accounts
from: "+15017122661", // your Twilio number
body: "Hello from Twilio!",
});
console.log(`Sent: ${message.sid}`);
You're ready to use any Twilio skill. Trial accounts have restrictions -- see Constraints below.
Trial accounts can only send to verified phone numbers (up to 5 per account).
Verified numbers work across both messaging and voice. Remove this restriction by upgrading your account.
Some products require explicit activation:
| Product | How to enable |
|---|---|
| AI Assistants | Console > Explore Products > AI Assistants > Get started |
| Conversations | Console > Conversations > Manage > Overview > Enable Conversations |
| Verify | Console > Verify > Services > Create new |
| WhatsApp (sandbox) | Console > Messaging > Try it out > Send a WhatsApp message |
| ConversationRelay | Console > Voice > ConversationRelay > complete onboarding form |
| Language | Install | SDK package |
|---|---|---|
| Python | pip install twilio | twilio |
| Node.js | npm install twilio | twilio |
| Java | Maven/Gradle | com.twilio.sdk:twilio |
| C# | dotnet add package Twilio | Twilio |
| Ruby | gem install twilio-ruby | twilio-ruby |
| PHP | composer require twilio/sdk | twilio/sdk |
| Go | go get github.com/twilio/twilio-go | twilio-go |
Always load credentials from environment variables -- never hardcode them.
Python
import os
from twilio.rest import Client
client = Client(os.environ["TWILIO_ACCOUNT_SID"], os.environ["TWILIO_AUTH_TOKEN"])
Node.js
const twilio = require("twilio");
const client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);
For production, use API Keys instead of Auth Token. See twilio-iam-auth-setup.
The CLI is useful for quick operations and local webhook testing.
# Install (macOS)
brew tap twilio/brew && brew install twilio
# Install (npm -- all platforms)
npm install -g twilio-cli
# Login (creates an API key automatically)
twilio login
# Verify setup
twilio phone-numbers:list
The CLI stores profiles for switching between accounts:
# List profiles
twilio profiles:list
# Switch active profile
twilio profiles:use my-project
# Use environment variables instead of profiles
export TWILIO_ACCOUNT_SID=ACxxxxxxxx
export TWILIO_AUTH_TOKEN=xxxxxxxx
Precedence: --profile flag > environment variables > active profile.
Creating a new Twilio account: Accounts can only be created from the Console UI — there is no API for creating top-level accounts. A new account is automatically created when a user signs up. Additional accounts can be created from Console > My Accounts (or "View all accounts").
To see all your accounts: Console > My Accounts shows all accounts and subaccounts you have access to. For Organization-wide visibility, see Console > Admin > Accounts (requires Organization admin role). See twilio-organizations-setup for Organization-level governance.
Subaccounts are child accounts under your main (parent) account. Use them for multi-tenant apps, per-customer isolation, or team separation.
How they differ from the parent account:
Create via Console: Console > My Accounts > Create Subaccount
Create via API:
Python
subaccount = client.api.accounts.create(friendly_name="Customer A")
print(f"Subaccount SID: {subaccount.sid}")
# Store securely — auth_token is only shown at creation time
# e.g., secrets_manager.store("subaccount_auth_token", subaccount.auth_token)
Node.js
const subaccount = await client.api.accounts.create({ friendlyName: "Customer A" });
console.log(`Subaccount SID: ${subaccount.sid}`);
Always use the subaccount's own credentials (API Keys or Auth Token) when accessing subaccount resources — do NOT use the parent account's credentials as a shortcut.
Python — access subaccount resources
# Correct: use subaccount credentials
sub_client = Client(subaccount.sid, subaccount.auth_token)
call = sub_client.calls.create(
to="+15558675310",
from_="+15017122661", # number owned by this subaccount
url="https://yourapp.com/voice"
)
# Also correct: parent credentials with subaccount SID (v2010 API only)
parent_client = Client(os.environ["TWILIO_ACCOUNT_SID"], os.environ["TWILIO_AUTH_TOKEN"])
calls = parent_client.api.accounts(subaccount.sid).calls.list()
Critical: Resources on separate subdomains (studio.twilio.com, taskrouter.twilio.com) require subaccount-specific credentials. Parent account credentials will not work on these subdomains.
closed via API or Console. Closed subaccounts are automatically deleted after 30 days| Feature | Trial | Upgraded |
|---|---|---|
| Phone numbers | 1 | Unlimited |
| Send to unverified numbers | No | Yes |
| Outbound message prefix | Yes (visible to recipient) | No |
| Verified caller IDs | Up to 5 | Not needed |
| A2P 10DLC registration | No | Yes |
| Daily WhatsApp messages | 50 | Unlimited |
| ConversationRelay | No | Yes (after onboarding) |
| Voice: outbound calls | Domestic only | International |
twilio-security-api-auth.twilio-organizations-setuptwilio-security-api-authtwilio-sms-send-messagetwilio-whatsapp-send-messagetwilio-messaging-webhookstwilio-compliance-onboardingtwilio-webhook-architectureWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub twilio/ai --plugin twilio-developer-kit57 skills in this plugin
/twilio-agent-augmentation-architectPlanning skill for augmenting human agents with real-time AI intelligence. Qualifies the developer's use case across coaching, compliance, QA, and routing to recommend the right Conversation Intelligence + Conversation Memory + TaskRouter architecture. Handles both "I want to add AI coaching to my call center" and "configure Conversation Intelligence operators for script adherence."
/twilio-agent-connectTwilio Agent ConnectTwilio Agent Connect (TAC) is a Python and TypeScript SDK that integrates third-party LLM agentic applications with Twilio's communication technologies. TAC provides middleware for identity resolution, memory/context management (via Conversation Memory), conversation orchestration (via Conversation Orchestrator), and multi-channel handling (Voice, SMS, RCS, WhatsApp, Chat)./twilio-ai-agent-architectPlanning skill for AI-powered conversational agents. Qualifies the developer's use case across outcome sophistication, entry point, and customer profile to recommend the right Twilio Conversations architecture and implementation skills. Handles both high-level requests ("build me a voice AI assistant") and specific ones ("integrate ConversationRelay with my OpenAI backend").
Other plugins' skills for the same job