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.

prajwalfullstack prajwalfullstack Hi Im a full stack developer, a vibe coded MVP to Market ready product, I'm here to help ISHANTDEEP SINGH ISHANTDEEP SINGH Senior Software Engineer with 7+ years of experience in React, JavaScript, TypeScript, Next.js, and Node.js. I’ve also worked as a tech lead for startups, owning end-to-end technical execution including architecture, development, scaling, and delivery. I bring a strong mix of hands-on coding, product thinking, and technical leadership, and I’m comfortable building products from scratch as well as improving and scaling existing systems. Daniel Vázquez Daniel Vázquez Software Engineer with over 10 years of experience on Startups, Government, big tech industry & consulting. rayush33 rayush33 JavaScript (React.js, React Native, Node.js) Developer with demonstrated industry experience of 4+ years, actively looking for opportunities to hone my skills as well as help small-scale business owners with solutions to technical problems Antriksh Narang Antriksh Narang 5 years+ Experienced Dev (Specially in Web Development), can help in python, javascript, react, next.js and full stack web dev technologies. Sage Fulcher Sage Fulcher Hey I'm Sage! Im a Boston area software engineer who grew up in South Florida. Ive worked at a ton of cool places like a telehealth kidney care startup that took part in a billion dollar merger (Cricket health/Interwell health), a boutique design agency where I got to work on a ton of exciting startups including a photography education app, a collegiate Esports league and more (Philosophie), a data analytics as a service startup in Cambridge (MA) as well as at Phillips and MIT Lincoln Lab where I designed and developed novel network security visualizations and analytics. I've been writing code and furiously devoted to using computers to make people’s lives easier for about 17 years. My degree is in making computers make pretty lights and sounds. Outside of work I love hip hop, the Celtics, professional wrestling, magic the gathering, photography, drumming, and guitars (both making and playing them) Matthew Butler Matthew Butler Systems Development Engineer @ Amazon Web Services MFox MFox Full-stack professional senior engineer (15+years). Extensive experience in software development, qa, and IP networking. 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. Jared Hasson Jared Hasson Full time lead founding dev at a cyber security saas startup, with 10 yoe and a bachelor's in CS. Building & debugging software products is what I've spent my time on for forever

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