Is google voice number is SMS-capable? I am getting the following error from rails app:
A Twilio::REST::RequestError occurred in sms#dispatcher_api: The From phone number +14242752338 is not a valid, SMS-capable inbound phone number or short code for your account. twilio-ruby (3.9.0) lib/twilio-ruby/rest/client.rb:226:in 'connect_and_send'
Twilio only supports the From being a number you lease from them.
So the error you're getting is Twilio telling you they won't allow that number to be used as the sender, not that the number isn't capable of receiving SMS messages.
That's what is meant by (emphases added):
a valid, SMS-capable inbound phone number or short code for your account
Related
I want to use Twilio for verifying phone number of users registering on my app.
As a backend, I have Parse.
I tried to send an SMS using the test credentials, so far I received a success message, but, I didn't received the SMS!
I've tried to switch to the live credentials; however, I received the following:
{
"code": 141,
"error": {
"status": 400,
"message": "The From phone number +12025550162 is not a valid, SMS-capable inbound phone number or short code for your account.",
"code": 21606,
"moreInfo": "https://www.twilio.com/docs/errors/21606"
}
}
I've also tried to replace the "From" Phone number to an alphanumeric sender ID, but that didn't work too!
What should I do in that case?
Twilio developer evangelist here.
Firstly, test credentials don't actually send messages, they are simply there to test that you are making your API requests properly. Also note that they only work with specific numbers and only on a few endpoints.
In order to send SMS messages from Twilio, you need to buy and use a number from Twilio as your "From" number. Your number there doesn't look as though it is a Twilio number. You can buy numbers from your Twilio console.
My guess is that you're sending messages to US numbers. Alphanumeric sender IDs don't work in the US I'm afraid, you can see the countries that support it here.
Finally, if you're looking to verify your users' numbers, have you checked out Authy? They do phone verification as an API, as well as two factor authentication.
Let me know if this helps at all.
I recently started using Twilio to send SMS in one of my apps. Although the twilio's dashboard shows that the SMS was send using the set alphanumeric sender id. It arrives on my phone with a different number totally. Anyone have any idea why? There's nothing about this on the Twilio website.
It turns out this is a carrier problem. They can change sender id (within reason) to increase the chance that an SMS is delivered. So there's basically nothing Twilio can do about it.
If you still have doubts, contact Twilio support.
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:
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!
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.
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
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.
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 screenshot
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.
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.
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.
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.
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.
I have a Twilio test account for now. I got assigned a Belgian phone number and I validated my own mobile number. I'm trying to send simple SMS message from my assigned Twilio number to my mobile number but that doesn't work.
The dashboard indicates "Messaging is unavailable for this phone number." But in the messaging FAQ (https://www.twilio.com/help/faq/phone-numbers/which-countries-does-twilio-have-phone-numbers-in-and-what-are-their-capabilities), it is mentioned that Domestic and Global SMS is enabled for Belgium.
1) Why can't I send SMS messages if my country is listed as SMS enabled?
2) Is it because I have a trial account and will it work once I upgrade?
Answer to your questions:
1) Why can't I send SMS messages if my country is listed as SMS enabled?
For this, I can say may there something wrong in your code.
If your country is listed in SMS enabled countries, then it will work there is no issue.
2) Is it because I have a trial account and will it work once I upgrade?
From an trial account You can send SMS to the number with you registeted. To other numbers it will work after you upgrade your account.
If you share your code then will be easy to help you.
You can refer this, I think it will help you.
http://phpobserver.wordpress.com/2014/03/18/build-sms-text-message-into-your-web-apps-twilio-api/
The problem is that the phone number you have configured is a Belgian phone number. Twilio currently doesn't support sending SMS from a Belgian phone number to a Belgian phone number.
The solution is that you have to configure Twilio to to send the SMS from a US number to the Belgian phone number.
If you're on a trial account, release the assigned Belgian phone number. Then under number management section in your dashboard you will see:
You don't have any Twilio numbers, but your first number is on us. Get it now.
Click on "Get it now". Then, if you verified using a Belgian phone number it will by default show you a phone number from Belgium. Click on "Choose your own number". Then go to the dropdown box and change the country to US such that the proposed phone numbers are US numbers.
With the US numbers you will see that they are capable of sending SMS to Belgian phone numbers. The only disadvantage of this approach is that the SMS will appear to be coming from US. But depending on your application this may not be such a big problem.
Twilio evangelist here.
Its likely that the Belgian number that you were assigned when you created your account only has voice enabled on it, but the good news is that Twilio does have SMS enabled Belgian numbers.
When you click the "Buy a Number" button, you can tell Twilio to only show you numbers that are SMS-enabled:
Hope that helps.
At the time of posting, there were no SMS enabled Belgian numbers available. It seems that the pool of Belgian numbers that support both SMS and Voice is very limited and you need to be lucky to get one.
I have two questions.
I am creating a website for a client I am trying to code in Twilio SMS tools for end users and for management. I have the request and response tools built so I am all set functionally. So the questions are:
A. Can I send SMS message to any phone number OR does every number I send an SMS have to be added to twilio and verified before I can freely send SMS? It would be nice if I could just collect my phone numbers from the end users and free them from the pain of the verification process.
B. If I must verify end users then can I send SMS messages to them with their verification code? Right now an automated message call is sent to the phone number that wants SMS updates and you have to key in a six digit verification code....AND then you can send that person SMS messages. The phone call is kind of awkward.
A. Once you have a regular Twilio account, you can send an SMS to any phone number. However, some phone numbers (e.g., most landlines) cannot accept an SMS. If you try to send an SMS to those numbers with your cellphone, you will probably get a message back from the carrier that the number cannot accept SMS. However, Twilio will report success in sending the message, even though the message obviously cannot be sent to that number, and you will get no indication that the message did not go through.
But, no, there is no need to specifically add the numbers as verified for them to work with Twilio.
You can use a service like https://www.carrierlookup.com/ (which Twilio told me about) to check if a phone number can receive SMS messages.
B. -- you do not need to verify end users through Twilio, although I do think there are restrictions on a Twilio trial account that will be removed once you have a paid Twilio account.
Twilio evangelist here
Once you upgrade, you can send a message to any phone number. While you are using a trial account, you have to verify a number in order to send a message to it. More info about how a trial account works is here:
http://www.twilio.com/help/faq/twilio-basics/how-does-twilios-free-trial-work
Hope that helps.
Regarding verification: Twilio has a service that allows verifying phone numbers, including format, carrier, if it's mobile or landline, etc: https://www.twilio.com/lookup
API Docs: https://www.twilio.com/docs/lookup/api