Jason Swett
Jason Swett

Reputation: 45164

Twilio test credentials don't work

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?

Upvotes: 2

Views: 2518

Answers (1)

Peter Alfvin
Peter Alfvin

Reputation: 29419

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

Upvotes: 4

Related Questions