Reputation: 56
I get the following error when trying to send a message to my phone number from my Twilio number
from twilio.rest import TwilioRestClient as TRC
client = TRC('AC**********************edc','a7b***************************3d2') # connect to an account
client.messages.create(from_='+17********25', to='+23***********27', body='Twilio\'s the best!!') #create the message
Traceback
TwilioRestException: The From phone number +17*******25 is not a valid,
SMS-capable inbound phone number or short code for your account.
Can someone pls help me out?
Upvotes: 0
Views: 123
Reputation: 330
The twilio number (Your from number: should be sms-enabled) that you have bought doesn't seem to have Capabilities of sending smses.
Upvotes: 0
Reputation: 1234
Have you made sure to add the from_
number to your Twilio account on your Account's phone numbers page. Error 21606 may have more information regarding this issue. If this is using your "test credentials" you will want to have a look at test credentials.
Upvotes: 2