Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twilio says I don't have permission to send to the region of my 'To' number

Tags:

I am trying to send a simple SMS and have been doing so for over a year with my app. All of a sudden, on my staging and local environment (prod is fine), I keep getting this error:

Twilio::REST::RequestError: Permission to send an SMS has not been enabled for the region indicated by the 'To' number: '+13105551234' 

Both numbers are local California numbers and I have the US enabled on my account. I changed the numbers to 5551234 for this SOF post but they are both valid numbers (the from number is my twilio number and the to number is my personal cell phone.

client.account.messages.create(body: 'hello', to: '+13105551234', from: '+15105551234') 

What could be causing this error?

EDIT: I should mention it worked when I sent an SMS to my friend's phone and then when I tried a second time to his number, it gave me the same error.

like image 640
Matthew Berman Avatar asked May 03 '15 17:05

Matthew Berman


People also ask

Why is Twilio not sending SMS?

Two common reasons for this: You might be trying to send SMS from a phone number which is only enabled for voice. This list shows which Twilio phone numbers are SMS enabled. All other Twilio phone numbers are not capable of sending SMS messages.

Can I use Twilio outside of us?

Yes, Twilio allows you to send SMS messages to the rest of the world from US or Canadian phone numbers as well as our SMS-enabled mobile numbers. With these numbers, you can send SMS messages to 150+ countries and billions of subscribers.

Can Twilio send from my number?

Any SMS-enabled Twilio phone number or Hosted SMS number on your account can be used to send SMS messages. To use a phone number for sending messages, input your phone number in the From parameter of your API request using E.


1 Answers

So...turns out that after creating the Twilio number and activating everything. You have to come here, to pick the nations you want to text to.

like image 182
Visionwriter Avatar answered Sep 19 '22 15:09

Visionwriter