Messaging
Twilio
target_app: "twilio" · endpoint /v1/messaging/execute · Bring your own credentials
Setup
From your Twilio Console, copy the Account SID and Auth Token, and buy/use a Twilio phone number.
Credentials needed on your Connections page
Actions
send_sms
Send a text message.
Request body:
{
"user_id": "...",
"action": "send_sms",
"payload": { "to": "+15551234567", "text": "Hello!" },
"target_app": "twilio"
}provider_response.result shape:
{ "sid": "SM...", "status": "queued" }send_whatsapp
Send a WhatsApp message (requires WhatsApp-enabled sender).
Request body:
{
"user_id": "...",
"action": "send_whatsapp",
"payload": { "to": "+15551234567", "text": "Hello!" },
"target_app": "twilio"
}provider_response.result shape:
{ "sid": "SM...", "status": "queued" }make_call
Place a phone call using TwiML instructions from a URL.
Request body:
{
"user_id": "...",
"action": "make_call",
"payload": { "to": "+15551234567", "twiml_url": "https://.../twiml.xml" },
"target_app": "twilio"
}provider_response.result shape:
{ "sid": "CA...", "status": "queued" }get_message_status
Check delivery status of a sent message.
Request body:
{
"user_id": "...",
"action": "get_message_status",
"payload": { "messageSid": "SM1234567890abcdef" },
"target_app": "twilio"
}provider_response.result shape:
{ "sid": "SM...", "status": "delivered" }list_messages
List recent messages (up to 20).
Request body:
{
"user_id": "...",
"action": "list_messages",
"payload": {},
"target_app": "twilio"
}provider_response.result shape:
{ "messages": [{"sid":"...","status":"..."}] }custom
Escape hatch for any Twilio REST endpoint.
Request body:
{
"user_id": "...",
"action": "custom",
"payload": { "path": "Messages.json", "method": "GET", "form_encoded": false, "body": {} },
"target_app": "twilio"
}provider_response.result shape:
{...}Anticipated errors & fixes
21211 "Invalid 'To' Phone Number"
Cause: Phone number missing the + and country code.
Fix: Always use full E.164 format, e.g. +15551234567, never a local format.
21608 "The number is unverified" (trial accounts)
Cause: Twilio trial accounts can only send to verified numbers.
Fix: Verify the recipient in Twilio Console, or upgrade out of trial mode.
401 Authenticate (inside provider_response)
Cause: Account SID or Auth Token is wrong.
Fix: Re-copy both from the Twilio Console dashboard exactly.
401 "Unauthorized: Invalid API key."
Cause: Your eConnect Authorization header is missing, malformed, or the key was regenerated/revoked.
Fix: Copy your api_key fresh from the eConnect dashboard and confirm the header reads exactly "Authorization: Bearer <key>".
429 "Too many requests"
Cause: You've exceeded your plan's per-minute rate limit.
Fix: Wait a minute and retry, or upgrade your plan for a higher per-minute limit.
429 "Monthly API limit exceeded"
Cause: You've used your plan's full monthly request allowance.
Fix: Wait for your next billing cycle reset, or upgrade to a plan with a higher monthly limit.