Bolt integration

Twilio SMS Messages Not Sending from Bolt App

Your Bolt.new application uses Twilio for SMS notifications (verification codes, order updates, appointment reminders) but messages are never delivered. The API calls appear to succeed, or they fail with cryptic error codes, and users never receive the SMS on their phones.

SMS is often used for critical user flows like two-factor authentication and order notifications. When it fails, users can't verify their phone numbers, miss important updates, or can't complete checkout processes that require SMS verification. Unlike email, there's no spam folder to check - the message either arrives or it doesn't.

Twilio has strict compliance requirements, number formatting rules, and sender registration requirements that Bolt's AI-generated code often doesn't account for. A message that works when testing with your own phone may fail when sending to other numbers, carriers, or countries.

Error Messages You Might See

Error 20003: Authentication error - invalid credentials Error 21211: Invalid 'To' phone number Error 21608: The 'from' phone number is not a valid SMS-capable number Error 21610: Message cannot be sent to unsubscribed recipient Error 30007: Message delivery - carrier violation Error 63018: A2P 10DLC - Campaign not registered
Error 20003: Authentication error - invalid credentialsError 21211: Invalid 'To' phone numberError 21608: The 'from' phone number is not a valid SMS-capable numberError 21610: Message cannot be sent to unsubscribed recipientError 30007: Message delivery - carrier violationError 63018: A2P 10DLC - Campaign not registered

Common Causes

  • Trial account limitations — Twilio trial accounts can only send to verified phone numbers, silently failing for all other recipients
  • Invalid phone number format — Numbers not in E.164 format (+1234567890) cause immediate failures or delivery to wrong numbers
  • Twilio credentials on client side — Account SID and Auth Token placed in frontend code where they can't authenticate (and are exposed publicly)
  • Unregistered sender ID — In the US, A2P 10DLC registration is required for application-to-person messaging; unregistered numbers get filtered
  • Message content filtered — SMS contains URLs or keywords that carrier spam filters block
  • Wrong Twilio phone number — The 'from' number is not a Twilio number you own, or it's not SMS-capable

How to Fix It

  1. Upgrade from trial — Twilio trial accounts can only send to verified numbers. Upgrade to a paid account to send to any phone number
  2. Format numbers correctly — Always use E.164 format: const formattedNumber = `+${countryCode}${phoneNumber.replace(/\D/g, '')}` and use Twilio's Lookup API to validate numbers before sending
  3. Keep credentials server-side — Never put Twilio credentials in frontend code. Create an API route: const client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN)
  4. Register for A2P 10DLC — In Twilio console, register your brand and campaign under Messaging > Compliance to ensure delivery in the US
  5. Check message logs — In Twilio console, go to Monitor > Logs > Messages to see delivery status and error codes for every message attempt
  6. Handle errors in code — Wrap Twilio calls in try-catch: try { const message = await client.messages.create({...}); } catch (err) { console.error('SMS Error:', err.code, err.message); }

Real developers can help you.

PawelPloszaj PawelPloszaj I'm fronted developer with 10+ years of experience with big projects. I have small backend background too Victor Denisov Victor Denisov Developer Matthew Jordan Matthew Jordan I've been working at a large software company named Kainos for 2 years, and mainly specialise in Platform Engineering. I regularly enjoy working on software products outside of work, and I'm a huge fan of game development using Unity. I personally enjoy Python & C# in my spare time, but I also specialise in multiple different platform-related technologies from my day job. Milan Surelia Milan Surelia Milan Surelia is a Mobile App Developer with 5+ years of experience crafting scalable, cross-platform apps at 7Span and Meticha. At 7Span, he engineers feature-rich Flutter apps with smooth performance and modern UI. As the Co-Founder of Meticha, he builds open-source tools and developer-focused products that solve real-world problems. Expertise: 💡 Developing cross-platform apps using Flutter, Dart, and Jetpack Compose for Android, iOS, and Web. 🖋️ Sharing insights through technical writing, blogging, and open-source contributions. 🤝 Collaborating closely with designers, PMs, and developers to build seamless mobile experiences. Notable Achievements: 🎯 Revamped the Vepaar app into Vepaar Store & CRM with a 2x performance boost and smoother UX. 🚀 Launched Compose101 — a Jetpack Compose starter kit to speed up Android development. 🌟 Open source contributions on Github & StackOverflow for Flutter & Dart 🎖️ Worked on improving app performance and user experience with smart solutions. Milan is always happy to connect, work on new ideas, and explore the latest in technology. Prakash Prajapati Prakash Prajapati I’m a Senior Python Developer specializing in building secure, scalable, and highly available systems. I work primarily with Python, Django, FastAPI, Docker, PostgreSQL, and modern AI tooling such as PydanticAI, focusing on clean architecture, strong design principles, and reliable DevOps practices. I enjoy solving complex engineering problems and designing systems that are maintainable, resilient, and built to scale. Yovel Cohen Yovel Cohen I got a lot of experience in building Long-horizon AI Agents in production, Backend apps that scale to millions of users and frontend knowledge as well. Daniel Vázquez Daniel Vázquez Software Engineer with over 10 years of experience on Startups, Government, big tech industry & consulting. legrab legrab I'll fill this later Costea Adrian Costea Adrian Embedded Engineer specilizing in perception systems. Latest project was a adas camera calibration system. Taufan Taufan I’m a product-focused engineer and tech leader who builds scalable systems and turns ideas into production-ready platforms. Over the past years, I’ve worked across startups and fast-moving teams, leading backend architecture, improving system reliability, and shipping products used by thousands of users. My strength is not just writing code — but connecting product vision, technical execution, and business impact.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help

Frequently Asked Questions

Why can I send SMS to my phone but not to other numbers?

You're on a Twilio trial account, which can only send messages to phone numbers you've verified in the Twilio console. Upgrade to a paid account (minimum $20 credit) to send to any phone number.

What is A2P 10DLC and do I need it?

A2P 10DLC (Application-to-Person 10-Digit Long Code) is a US carrier requirement for businesses sending SMS from standard phone numbers. Without registration, your messages may be silently filtered. Register in Twilio console under Messaging > Compliance > Registration.

Related Bolt Issues

Can't fix it yourself?
Real developers can help.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help