DEV Community

Vigilmon
Vigilmon

Posted on

How to Monitor Your Twilio SMS and Voice API with Vigilmon

How to Monitor Your Twilio SMS and Voice API with Vigilmon

Twilio powers SMS, voice calls, and messaging for millions of applications. When your Twilio integration goes down, users stop receiving OTPs, order confirmations, and support messages — silently. Vigilmon lets you catch Twilio API degradation before your users report missing texts.

Why Monitor Your Twilio Integration?

Twilio's status page tracks platform-wide incidents, but your specific account can fail for reasons that never appear there:

  • Account suspension due to trial limits, compliance flags, or billing
  • Phone number deprovisioning after inactivity or abuse reports
  • Messaging Service misconfiguration after a settings change
  • Webhook delivery failures when your callback endpoint is down
  • API key rotation leaving old keys rejected

Any of these means silent failure — your app thinks it sent the SMS, but the user never receives it.

What to Monitor

1. Twilio Status API (Account Health Check)

Twilio exposes a simple REST API you can hit with HTTP authentication to verify your account is active:

https://api.twilio.com/2010-04-01/Accounts/{AccountSid}.json
Enter fullscreen mode Exit fullscreen mode

This endpoint returns a 200 OK when your account is active and your credentials are valid. A 401 means your auth token changed; a 403 means account suspension.

Vigilmon setup:

  1. Go to vigilmon.online → Add Monitor
  2. Monitor type: HTTP(S)
  3. URL: https://api.twilio.com/2010-04-01/Accounts/YOUR_ACCOUNT_SID.json
  4. Authentication: Basic Auth — username = Account SID, password = Auth Token
  5. Expected status: 200
  6. Check interval: every 5 minutes

2. Twilio Webhook Receiver Endpoint

When Twilio delivers SMS status callbacks or incoming message webhooks to your app, your endpoint must respond with 200 OK. If it times out or errors, Twilio stops delivering.

Add a separate monitor for each webhook URL your app exposes:

https://yourapp.com/webhooks/twilio/sms-status
https://yourapp.com/webhooks/twilio/incoming
Enter fullscreen mode Exit fullscreen mode

Set Vigilmon to monitor these URLs with a GET request (or HEAD if your server accepts it) and alert on anything outside 2xx.

3. Twilio Lookup API (Number Validation)

If your app validates phone numbers before sending, the Lookup API is a dependency worth monitoring:

https://lookups.twilio.com/v1/PhoneNumbers/+15005550006
Enter fullscreen mode Exit fullscreen mode

This test number is always valid in Twilio's test environment. A healthy response confirms Lookup API connectivity.

Alert Configuration

For a production Twilio integration handling OTPs or 2FA:

  • Alert threshold: 1 failure (no retries — OTP delays matter)
  • Escalation: PagerDuty or Slack → on-call immediately
  • Recovery alert: enabled (to track MTTR)

For non-critical SMS (newsletters, marketing):

  • Alert threshold: 2–3 consecutive failures before page
  • Notification: Slack channel, email

Setting Up in Vigilmon

# Test your Twilio endpoint health before adding to Vigilmon
curl -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" \
  "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID.json"

# Expected: {"status": "active", ...}
Enter fullscreen mode Exit fullscreen mode

Once confirmed working, add to Vigilmon with Basic Auth credentials. Vigilmon checks from multiple regions simultaneously, so you catch CDN-level or routing issues that single-location checkers miss.

Monitoring Twilio's Own Status Page

Beyond your integration, you can also monitor Twilio's status API:

https://status.twilio.com/api/v2/status.json
Enter fullscreen mode Exit fullscreen mode

Add this as a second monitor and configure a keyword check for "indicator":"none" — if that string disappears, Twilio has an active incident.

What Happens When Twilio Goes Down?

Twilio outages tend to be partial — affecting one region or carrier while others work fine. Your users in the US might get SMS fine while European users get nothing. Multi-region monitoring from Vigilmon catches this asymmetry; single-location checkers report "up" while half your users are affected.

Summary

Monitor URL Pattern Auth What It Catches
Account health /Accounts/{SID}.json Basic Suspended account, bad credentials
Webhook receiver /webhooks/twilio/* None Your endpoint down
Lookup API /v1/PhoneNumbers/+15... Basic Lookup degradation
Twilio status status.twilio.com/api/v2/status.json None Platform incidents

Add all four to Vigilmon and you'll know about Twilio problems before your support queue fills up with "I never got my verification code" tickets.


Vigilmon is an uptime monitoring service with multi-region checks, SSL monitoring, and instant alerts. Free plan available.

Top comments (0)