Skip to content

Field notes

Twilio fix guides

Most Twilio failures are a setting, not a bug. A number is still pointing at the demo TwiML URL, a campaign never finished registering, a webhook has no fallback. None of it raises an exception in your code — the message simply does not arrive. Each note here explains one such problem and gives you a script that finds it through the API.

Read-only keyPython and Node.jsTests included
Browse all 12 scripts on GitHub Download them all as a zip Field guide PDF (12 fixes, 52 KB) Follow @allanninal Every fix on this page has a tested Python and Node.js script in the repo. Free, and MIT as stated in its README.
Why these scripts never write

A script here holds a credential to an account that can send messages and charge you for them. So these read, they tell you exactly what is wrong, and they print the repair: the resource, the field, the value. You run it.

Give them a Twilio API Key with read access rather than the account auth token. If a read-only key leaks, somebody learns your phone numbers; if the auth token leaks, somebody sends from them.

Twilio

TwilioDiagnostic

A phone number still points at Twilio's demo TwiML

Callers hear the Twilio demo greeting instead of your app. The webhook answers 200, every call is marked completed, and error monitoring never sees it.

TwilioDiagnostic

Inbound SMS disappears into a number with no sms_url

The Messaging Service has an inbound URL and it is being ignored. Deferring to the sender's webhook means a blank sms_url on the number drops every reply.

TwilioDiagnostic

A Messaging Service with no A2P campaign fails US sends

us_app_to_person_registered is false, so every US 10DLC send returns 30034. The service accepts numbers and API calls happily; only the message fails.

TwilioDiagnostic

A number with no fallback URL drops the call when yours 500s

Twilio calls the fallback URL only when the primary handler errors. With none configured, one 11200 during a deploy is a lost customer call.

TwilioDiagnostic

Carrier filtering drops your SMS silently with error 30007

Messages go undelivered with error_code 30007. Nothing arrives, you are billed anyway, and the Messages list has no error filter to find them with.

TwilioDiagnostic

Sends to recipients who texted STOP bounce with 21610

Twilio remembers the opt-out and your database does not, so every send to that number is rejected with 21610 and the compliance record keeps growing.

TwilioDiagnostic

SMS to a landline fails with 30006 and retrying never helps

Error 30006 and 21614 mean the destination cannot receive SMS at all. The retry loop bills you forever; Lookup line type is what settles the argument.

TwilioDiagnostic

Messages stay queued or accepted and never reach a final state

Status sits at queued or accepted for hours with no error_code. Part of it is throughput starvation, part is a scheduled send, and sent is not a failure.

TwilioDiagnostic

A2p campaign is FAILED and errors[] names the rejected field

campaign_status is FAILED and every US send returns 30034. The errors[] array names the exact attribute that was rejected, and nobody reads it.

TwilioDiagnostic

An A2P brand stuck at FAILED blocks every campaign under it

BrandRegistration.status is FAILED, so no campaign can attach and every US send is 30034. The reason is in errors[], not in the deprecated prose fields.

TwilioDiagnostic

An a2p campaign parked at IN_PROGRESS is not a live campaign

campaign_status sits at IN_PROGRESS for weeks, campaign_id is null, and the launch ships anyway. Nothing errors, and every US send returns 30034.

TwilioDiagnostic

An unverified toll-free number is blocked, not throttled

Every US and CA message from an unverified +1 8XX number fails 30032, and you are billed for the attempts. Pending review is a blocked state too.

Something not covered here?

These are the ones I keep hitting. If yours is broken in a way none of them describes, tell me on LinkedIn — it is usually how the next note gets written.