Send SMS with trial twilio account
Asked Answered
L

9

38

I want to try to send SMS to a cellphone in Austria. I have set up a free trial Twilio account to do so. however, my Twilio account seems not to be capable of doing so. but I think it should be possible to send SMS with the trial account?

This is a screenshot of my Twilio number where you can see that it's not capable of messaging: enter image description here

this is the exception i get when running my python-code which tries to send the SMS:

twilio.rest.exceptions.TwilioRestException: HTTP 400 error: 21606: The From phone number +43720881723 is not a valid, SMS-capable inbound phone number or short code for your account.

any idea on how I can get this running? in other words: how can I activate SMS-capability for my free Twilio account? if this is possible, what are the limitations, i.e., how many free SMS messages can I send?

thanks!

Leflore answered 18/1, 2015 at 11:1 Comment(1)
issue solved via: #25554331Leflore
K
42

To send SMS with trial twilio account TEST ACCOUNT SID and TEST AUTHTOKEN which is placed inside Phone Number > Tools > Test Credentials rather than ACCOUNT SID and AUTHTOKEN given by Console Dashboard > Account Summary.

Because ACCOUNT SID and AUTHTOKEN is bind after you buy the twilio number and TEST ACCOUNT SID and TEST AUTHTOKEN is bind with +15005550006.

Knee answered 21/2, 2017 at 7:22 Comment(1)
Hi Patel, I've tried to use the test account sid and test auth token however same error with having HTTP 400 The From phone number +63XXX is not a valid, SMS-capable inbound phone number or short code for your account. Can you help me with this, thanks in advance.Ladoga
H
24

If you received this error while trying to authenticate with your Test Credentials, you probably tried to send a message with a From number from your live account. The only number that can be used to send successful messages with your Test Credentials is +15005550006

Hiragana answered 20/1, 2017 at 8:40 Comment(2)
How did I miss this. Where is this info in the Docs? I seem to have overlooked it. Lucky you posted this or I would probably have never found out. lol Thank you!Interstice
Found it for future reference: twilio.com/docs/api/rest/test-credentialsInterstice
M
19

If you use this number +15005550006 along with your 'demo' twilio sid and token, this will show you the success (no error) but it actually not sending you any sms/ text.

Go to this page https://www.twilio.com/console/sms/getting-started/build and set a phone number like "+133438*****". Twilio will auto provide you a number like (334) 384-**** and by clicking the buttons you need to generate the phone number as like "+133438*****". Once you successful, try to use your 'live' sid and token number within the API. But before integrating the same, you can fire a SMS in your own phone number from this page https://www.twilio.com/console/sms/getting-started/build.

Otherwise, the API error message will show you that - [HTTP 400] *Unable to create record: The 'From' number +1*********** is not a valid phone number, shortcode, or alphanumeric sender ID.

Mcclean answered 25/5, 2017 at 14:35 Comment(1)
You can also use this online twilio tool twilio.com/lookup to know how a from phone number is look like with E.164 format.Mcclean
S
5

Your number is not capable (configure) for SMS sending. Go to your account and enable SMS capability. After that you will see a green check mark with text "https://demo.twilio.com/welcome/sms/reply/" instead of Messaging". Similar to below screenshotenter image description here

Sororate answered 6/8, 2015 at 10:47 Comment(0)
J
1

I got this error when I was using test Account SID and test Auth Token along with a regular number. Then I changed the Account SID and Auth Token to the regular ones and it worked as expected, i.e. allowed me to send SMS to a verified phone number.

Jaan answered 17/10, 2019 at 17:55 Comment(0)
F
0

If your number is sms capable and still you are getting the 21606 error, then check 'Active Numbers' tab under 'Manage Numbers'. It should show your number '+43720881723' as an active number.

Frisse answered 12/8, 2016 at 6:46 Comment(0)
S
0

I had found two errors in this regard, the problem is in the evaluation account and its limitations, but I found a way around it, within the rules of twilio.

Access this page and follow the instructions: https://www.twilio.com/console/sms/get-setup

Write down the number he gives you, this will be your new number, paste it in your application, it will solve your problem, but you still need to do one last thing, you need to check the number you want to send the message to, access this page:

https://www.twilio.com/console/phone-numbers/verified

After you do this, you can try to send the message again, if it fails, the problem must be elsewhere, as it worked for me.

Shagreen answered 20/5, 2021 at 17:56 Comment(0)
P
0

To send SMS with trial Twilio account, test ACCOUNT SID and test AUTHTOKEN which can be found at Phone Number > Tools > Test Credentials rather than ACCOUNT SID and AUTHTOKEN given by Console Dashboard > Account Summary.

Prudi answered 25/12, 2022 at 11:51 Comment(0)
M
-1

In my case, upgraded my Twilio account and copied the US Florida phone number as it is (9549386330) and got "is not a valid, SMS-capable inbound phone number or short code for your account" I only needed to put "1" in front of 19549386330 and it worked. so check the country code of your phone number as well.

Marbles answered 21/8, 2021 at 9:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.