Rate this page:

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.

Loading Code Sample...

        Create a message

        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.

        Loading Code Sample...

              Attempt to send a message to a non-mobile number

              There are many more magic numbers that you can check out in our API reference.

              Jarod Reyes David Prothero Kevin Whinnery Paul Kamp Brianna DelValle Diego Villavicencio
              Rate this page:

              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.

              Loading Code Sample...

                    Thank you for your feedback!

                    Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

                    Sending your feedback...
                    🎉 Thank you for your feedback!
                    Something went wrong. Please try again.

                    Thanks for your feedback!