Guides · Twilio
Get a Mac notification when a Twilio SMS is delivered or fails
Twilio reports each message's progress to a status callback URL: queued, sent, delivered, undelivered, failed. Point it at EventBar and a failed text is a notification, and the deliveries are a count.
Needs: the free EventBar app on your Mac, an EventBar account, and a Twilio account with permission to add webhooks. About five minutes. Generic JSON.
Steps
- Create the webhook URL. In the EventBar dashboard, open the Webhooks tab, pick the group this belongs to (one group per site or app is the usual shape), choose the provider Generic JSON, name it, and press Create. Copy the URL; it stays visible and can be rotated any time.
- Paste it into Twilio. Twilio takes the callback URL in two places: per message as the
StatusCallbackparameter when you call the API, or once for every message on a Messaging Service, under Messaging, then Services, your service, then Integration, then Delivery Status Callback. Paste the hook URL. Create the EventBar hook as Generic JSON with default typesms_status: Twilio posts form-encoded, not JSON, and a form body has no field EventBar can read as a type. A phone number's A message comes in webhook (Phone Numbers, the number, then Messaging Configuration) posts the same shape; give it a second hook with default typesms_inboundto count incoming texts. - Trigger one. Most services offer a test delivery; otherwise do the real thing once. It shows up in the dashboard's Events tab within a second and in the menu bar, as an undefined type named after the event. That first one is your proof the wiring works.
- Make it read well. Press Define on the new type and give it a title and a body template. Fields come from the payload, nested ones with dots. The table below is a starting point.
What you'll see
| Type | Title | Body template |
|---|---|---|
sms_status | SMS status | {message} |
sms_inbound | Incoming SMS | {message} |
Every type has its own switch in the menu bar, so a noisy one can be quiet on this Mac and still counted. Counts cover the last hour, 24 hours, 7 days, 30 days and all time.
Worth knowing
- Twilio sends
application/x-www-form-urlencoded. EventBar accepts it as plain text, so{message}is the raw form string,MessageStatus=delivered&To=%2B1555…and so on; readable, not pretty. Twilio sends several callbacks per message (sent, then delivered), so the count is callbacks, not messages. - If you want
deliveredandfailedas separate switches, put a Twilio Function in front: it receives the form fields and POSTs{"status": event.MessageStatus, "to": event.To, "error": event.ErrorCode}as JSON to the hook, with type fieldstatus. - Twilio signs callbacks with
X-Twilio-Signature; the generic preset doesn't check it. The URL is the secret. On the inbound hook Twilio logs a warning because the reply isn't TwiML; the message still arrives and nothing auto-replies.
The full contract, including how each preset reads a payload and what the answers mean, is in the API docs. Something about Twilio's payload changed? Tell us and we'll fix the guide.