twilio-node: The From phone number +15005550006 is not a valid, SMS-capable inbound phone number or short code for your account

I’m using a test account and trying to test SMS but it throws-

{ status: 400,
  message: 'The From phone number +15005550006 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' }

According to the doc, only number usable in From is " +15005550006" then why does it throw the error? https://www.twilio.com/docs/api/rest/test-credentials#test-sms-messages-parameters-From
What else can be used in test account?

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 27 (11 by maintainers)

Most upvoted comments

@shahp00ja I just ran into this error myself so I’ll just jump in here real quick. In order to send a test sms using the Twilio test numbers, you need to make sure you are using your test credentials. From the looks of this code it seems you may be using your actual credentials.

To find your test credentials login to twilio.com and go to this link: https://www.twilio.com/user/account/developer-tools/test-credentials

Hope this helps!

hum unfortunately i have the same error, and I’m using the test credentials…

screen shot 2019-01-15 at 1 26 00 pm

This is the code snippet im using i m using the test credentials i see at console page:

https://www.twilio.com/console

and the from account number i see at

https://www.twilio.com/console/phone-numbers/incoming

But i see an error message that

Unable to create record: The From phone number +15093599573 is not a valid, SMS-capable inbound phone number or short code for your account.

Can you please let me know the issue. Moreover i’ve verified my TO phone number which is mine

  • @philnash : any change in test mobile number or anything i’m doing wrong ? this is my code
var client = new twilio.RestClient(TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN);
client.sms.messages.create({
    to:'+91..........',  //my verified no
    from:'+15005550006',
    body:'ahoy hoy! Testing Twilio and node.js'
}, function(error, message) {

    if (!error) {
        console.log('Success! The SID for this SMS message is:');
        console.log(message.sid); 
      console.log('Message sent on:');
        console.log(message.dateCreated);
    } else {
        console.log('Oops! There was an error.');
        console.log(error);
    }
});