SMS
Migrating from Twilio
Most of a Twilio Programmable Messaging integration moves by changing the base URL, the key and the request format.
Migrating from Twilio
Most of a Twilio Programmable Messaging integration moves by changing the base URL, the key and the request format. With the SDK, honkio.messages.send() replaces the Twilio client's messages.create().
| Twilio | HonkIO | Notes |
|---|---|---|
| https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages.json | https://api.honkio.ca/v1/messages | Twilio's HTTP Basic Account SID and Auth Token become one Bearer API key, and form encoded fields become a JSON body. |
| To, From, Body | to, from, body | Same idea, lowercase field names in a JSON body. |
| StatusCallback (per message) | POST /v1/webhooks (account level) | Register an endpoint and the events it should receive once; there is no per message callback URL. |
| queued, sending, sent, delivered, undelivered, failed, received | QUEUED, SENDING, SENT, DELIVERED, UNDELIVERED, FAILED, RECEIVED | The common states carry over, in upper case. Twilio's accepted, scheduled, receiving, read, canceled and partially_delivered have no equivalent. |
| MessagingServiceSid | not available | Each send names one of your own numbers as from directly. |
| MediaUrl (MMS) | not available | SMS only; there is no media attachment field. |
| Per number webhook URL, form encoded, X-Twilio-Signature | message.received webhook, X-HonkIO-Signature | One account level webhook receives inbound texts for every number, as JSON. |
| Advanced Opt-Out keywords | built in | STOP, START and HELP, and their common variants, are recognized automatically on every number; nothing to configure. |
| POST /IncomingPhoneNumbers.json | POST /v1/phone-numbers | Canadian numbers only; search first with GET /v1/phone-numbers/search. |
Known differences
- Recipients must be Canadian phone numbers; a non-Canadian destination is refused before anything is charged.
- CASL consent is required before you can send: a missing or expired consent, or a recorded opt-out, is refused with 451 NO_CONSENT, CONSENT_EXPIRED or OPT_OUT_BLOCKED.
- Live sending needs a verified account phone number; a live send before that is refused with 403 ACCOUNT_NOT_VERIFIED.
- Test keys (mk_test_) simulate delivery: nothing reaches the carrier and nothing is charged.
- Billing is per SMS segment, in Canadian dollars.
- Data is stored in Canada.
HonkIO