Below is my code:
from twilio.rest import TwilioRestClient
account_sid = "Axxxxxxxxxx"
auth_token = "6xxxxxxxxxxxx"
client = TwilioRestClient(account_sid, auth_token)
message = client.sms.message.create(
body="Hi! How r u?",
to="+92343513****", # Replace with your phone number
from_="+49 15735984005") # Replace with your Twilio number
print message.sid
And this is what I get, when I tried running my Program:
Traceback (most recent call last):
File "/home/mubeen/Desktop/Udacity/Python_Programs/send_text.py", line 7, in
message = client.sms.message.create(
AttributeError: 'Sms' object has no attribute 'message'
Please help me out, I am stuck. Thank you.
[edited by admin: formatting]