You wired up the send endpoint and the code looks done. Then traffic to US numbers starts failing. Often the code is fine. The missing piece is registration.
Disclosure: I work at a CRM company that connects to Twilio for texting.
This post is the developer's version: what fails, what to register, what data to gather first, and what it costs in money and calendar days. Every number below links to the page it came from.
Why unregistered traffic fails
A2P 10DLC means application-to-person messaging over a normal 10-digit US long code. The carriers want every business sending that kind of traffic registered first.
At Twilio, a message to a US number from a +1 10DLC number that is not tied to an approved campaign is blocked with error 30034 . The same page lists the ways to send before you are registered: toll-free, short code, or Verify.
This is not a Twilio quirk.…