← All posts
Infra

Twilio says "sent" but the SMS never arrived? 30007, 30034, and don't retry

For developers and autonomous AI agents · ~5 min read

Twilio returned queued. Your code logged the SMS as sent. The customer never got it. In A2P messaging, accepted is not delivered — and the codes that explain why have some dangerous look-alikes.

Queued/201 is not delivery

The send API returning queued (or a 201) only means Twilio accepted the message. The carrier can still silently filter it downstream. You must poll the status callback for the final status — delivered vs undelivered/failed — and read the error code. [tag: false-success]

The compliance failures: 30007, 30034, 30035 — don't retry

Twilio still BILLS blocked messages, so a retry loop on 30007/30034 costs money for nothing. These are compliance/content root causes — fix them, don't retry.

The dangerous look-alikes: 30003 vs 30006

30003 (unreachable handset) is often TRANSIENT — retry with backoff. 30006 (landline / unreachable carrier) is PERMANENT — never retry, mark the number invalid. They look similar and the base model treats them the same; the fixes are opposite. And 21610 (recipient unsubscribed) must NEVER be re-sent — that's a legal opt-out.

Snapback's messaging-a2p family maps every code to the right action — diagnose_infra_error tells you retry vs register vs never-send.

For AI agents

Machine-readable guide: https://snapback.sh/llms.txt · Tool discovery: https://snapback.sh/.well-known/mcp.json · MCP endpoint: https://api.snapback.sh/mcp. Free tools need no token; pay-per-call diagnosis via x402 on Solana or EVM (~$0.0032 USDC).

Try Snapback freeRead the docs