From twilio-developer-kit
Create, configure, and manage WhatsApp Business senders via Twilio's Channels Senders API. Covers programmatic sender registration, profile setup, webhook configuration, sender lifecycle statuses, and ISV flows. Use this skill to register and manage production WhatsApp senders at scale.
npx claudepluginhub twilio/ai --plugin twilio-developer-kitThis skill uses the workspace's default tool permissions.
A WhatsApp sender is a phone number registered with WhatsApp Business through Twilio. Registration goes through a lifecycle of statuses before becoming `ONLINE`. Sandbox testing does not require a registered sender — see `twilio-whatsapp-send-message`.
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Share bugs, ideas, or general feedback.
A WhatsApp sender is a phone number registered with WhatsApp Business through Twilio. Registration goes through a lifecycle of statuses before becoming ONLINE. Sandbox testing does not require a registered sender — see twilio-whatsapp-send-message.
twilio-account-setup for signup and upgrade stepsTWILIO_ACCOUNT_SIDTWILIO_AUTH_TOKEN
— See twilio-iam-auth-setup for credential setup and best practicespip install twilio / npm install twilioPython
import os
from twilio.rest import Client
client = Client(os.environ["TWILIO_ACCOUNT_SID"], os.environ["TWILIO_AUTH_TOKEN"])
# Step 1: Initiate registration
sender = client.messaging.v2.channels.senders.create(
sender_id="whatsapp:+15017122661",
verification_method="sms"
)
print(sender.sid) # XExxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
print(sender.status) # CREATING
# Step 2: Submit the OTP Twilio sends to the number
sender = client.messaging.v2.channels.senders(sender.sid).update(
verification_code="123456"
)
print(sender.status) # ONLINE (may pass through TWILIO_REVIEW first)
Node.js
const twilio = require("twilio");
const client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);
// Step 1: Initiate registration
const sender = await client.messaging.v2.channels.senders.create({
senderId: "whatsapp:+15017122661",
verificationMethod: "sms",
});
console.log(sender.sid, sender.status);
// Step 2: Submit the OTP
const verified = await client.messaging.v2.channels.senders(sender.sid).update({
verificationCode: "123456",
});
console.log(verified.status);
| Status | Meaning |
|---|---|
CREATING | Registration initiated |
PENDING_VERIFICATION | Awaiting OTP submission |
VERIFYING | OTP being validated |
TWILIO_REVIEW | Under Twilio/Meta review |
ONLINE | Active and ready to send |
OFFLINE | Inactive — check offlineReasons |
DRAFT | Incomplete registration |
Python
sender = client.messaging.v2.channels.senders(SENDER_SID).update(
profile_name="Acme Support",
profile_about="Official support channel for Acme Corp",
profile_address="123 Main St, San Francisco, CA",
profile_vertical="PROFESSIONAL_SERVICES",
profile_logo_url="https://acme.com/logo.png",
profile_websites=["https://acme.com"]
)
Node.js
const sender = await client.messaging.v2.channels.senders(SENDER_SID).update({
profileName: "Acme Support",
profileAbout: "Official support channel for Acme Corp",
profileAddress: "123 Main St, San Francisco, CA",
profileVertical: "PROFESSIONAL_SERVICES",
profileLogoUrl: "https://acme.com/logo.png",
profileWebsites: ["https://acme.com"],
});
Python
sender = client.messaging.v2.channels.senders(SENDER_SID).update(
callback_url="https://yourapp.com/whatsapp/inbound",
callback_method="POST",
status_callback_url="https://yourapp.com/whatsapp/status"
)
Node.js
await client.messaging.v2.channels.senders(SENDER_SID).update({
callbackUrl: "https://yourapp.com/whatsapp/inbound",
callbackMethod: "POST",
statusCallbackUrl: "https://yourapp.com/whatsapp/status",
});
Python
sender = client.messaging.v2.channels.senders(SENDER_SID).fetch()
print(sender.status)
for s in client.messaging.v2.channels.senders.list():
print(s.sid, s.status)
Node.js
const sender = await client.messaging.v2.channels.senders(SENDER_SID).fetch();
const senders = await client.messaging.v2.channels.senders.list();
senders.forEach(s => console.log(s.sid, s.status));
If a sender is OFFLINE, check the offlineReasons array in the response (e.g. code 63020 means business hasn't accepted Twilio's Meta invitation).
If a number is already registered on WhatsApp (personal or business):
https://wa.me/<PHONE_NUMBER>?text=hiRegister senders under a client's WhatsApp Business Account (WABA):
Python
sender = client.messaging.v2.channels.senders.create(
sender_id="whatsapp:+15017122661",
waba_id="client-waba-id"
)
Node.js
const sender = await client.messaging.v2.channels.senders.create({
senderId: "whatsapp:+15017122661",
wabaId: "client-waba-id",
});
The client must accept Twilio's invitation in their Meta Business Manager.
twilio-whatsapp-send-messagetwilio-content-template-buildertwilio-verify-send-otp