Skip to main content

Twilio

1. Get your Account SID and Auth Token​

  1. Sign in to the Twilio Console.
  2. On the account dashboard, under Account Info, copy the Account SID (starts with AC) and the Auth Token (click Show first).
  3. You also need a sender: a Twilio phone number (Phone Numbers → Manage → Active numbers), a Messaging Service (MG…), or for WhatsApp an approved WhatsApp sender or the WhatsApp Sandbox.

Trial accounts can only send to phone numbers you verified in the console.

2. Create the connection​

  1. In Blokkio, go to Apps and open Twilio.
  2. Click Connect, enter the Account SID and Auth Token, and click Create.
  3. Test connection lists one message of your account and shows Connected — api.twilio.com answered 200.

Blokkio signs requests with HTTP Basic authentication and sends them only to api.twilio.com, under /2010-04-01/Accounts/<your Account SID>.

Actions​

ActionWhat it doesMain inputs
Send SMSSends a text message (MMS with a media URL)To, From (or Messaging Service SID), Message (up to 1600 characters), Media URL, Status callback URL
Send WhatsApp messageSends a WhatsApp messageTo, From (or Messaging Service SID), Message, Template (Content SID), Template variables, Media URL
List messagesRecent messages, newest firstTo, From, Sent on (YYYY-MM-DD), How many (1–1000)
Get messageOne message, for example to check its delivery statusMessage SID (SM…)

Phone numbers use the international E.164 format: + and the country code, no spaces (+14155550123).

WhatsApp: write both numbers with the whatsapp: prefix (whatsapp:+14155550123). Free text only works within 24 hours after the person last wrote to you. Outside that window, send an approved template: put its Content SID (HX…) in Template and its variables as JSON in Template variables, for example {"1": "Ada", "2": "12:30"}.

The output of the send actions includes sid and status (usually queued at first). Use Get message later, or a Status callback URL, to learn whether it was delivered.

Troubleshooting​

MessageWhat to do
HTTP 401Account SID or Auth Token is wrong, or the token was rotated.
HTTP 400 … 21211To isn't a valid phone number. Use E.164.
HTTP 400 … 21608Trial account: verify the recipient number in the Twilio console first.
HTTP 400 … 63016WhatsApp outside the 24-hour window: send a template (Content SID) instead.