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
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
- Upgrade from trial — Twilio trial accounts can only send to verified numbers. Upgrade to a paid account to send to any phone number
- 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
- 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)
- Register for A2P 10DLC — In Twilio console, register your brand and campaign under Messaging > Compliance to ensure delivery in the US
- Check message logs — In Twilio console, go to Monitor > Logs > Messages to see delivery status and error codes for every message attempt
- 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.
You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.
Get HelpFrequently 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.