25

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.

Matthew Berman
  • 8,481
  • 10
  • 49
  • 98
  • If this is code that was working and now doesn't, this is probably better suited for our support team to help with. Can you drop them an email at help@twilio.com and send in this description. Thanks – philnash May 04 '15 at 17:58
  • Does this answer your question? [Twilio permission to send sms has not been enabled for the region indicated](https://stackoverflow.com/questions/47423741/twilio-permission-to-send-sms-has-not-been-enabled-for-the-region-indicated) – Nick Oct 04 '20 at 06:25

2 Answers2

50

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.

Visionwriter
  • 649
  • 6
  • 12
4

@Visionwriter's answer is correct and exact answer.

URL is: https://www.twilio.com/user/account/settings/international/sms

I have also added a screenshot to breadcrumb on twilio console:

enter image description here

Sinan Eldem
  • 5,564
  • 3
  • 36
  • 37