Test your SMS Application
Test credentials
If you'd like to test API requests to send SMS messages without charging your account or actually sending an SMS, you can use your test credentials.
You use these credentials in the same way as your live credentials. However, when you authenticate with your test credentials, we will not charge your account, update the state of your account, or connect to real phone numbers.
To protect your production data, your test credentials can't interact with the data in your real account. As a consequence, you can't use phone numbers from your real account as the 'From' number in requests made with your test credentials.
Magic phone numbers
Simulate successfully sending an SMS message
Simulate a successful message by sending an SMS using the magic number +15005550006
as the From
number, and a regular phone number for the To
number.
Failure case: non-mobile number
You can simulate an attempt to send a message to a non-mobile number. Trigger this by passing the magic number +15005550009
as the To
number.
There are many more magic numbers that you can check out in our API reference.
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.