2
votes

I'm trying to send a text message with Twilio like this:

@client.account.messages.create(
  from: '+15005555006',
  to: '+15555555555',
  body: 'Hey there!'
)

and I get the following error:

Twilio::REST::RequestError: The From phone number +15005555006 is not a valid, SMS-capable inbound phone number or short code for your account.

This is odd to me because according to the docs, +15005550006 is the one and only valid number when you're using your test credentials.

FWIW, my production creds work just fine.

Any ideas?

1
+15005550006 != +15005555006 - Jonathan de M.
Well, they're pretty close. Doesn't that count for anything?! - Jason Swett

1 Answers

4
votes

The number should be +15005550006 per the docs you cited. You've got 5006 as the last four digits instead of 0006.