I ran the Example code of send text using Twilio,the code from:https://www.twilio.com/docs/libraries/python
my code is:
from twilio.rest import TwilioRestClient,
account_sid = "{{ Account 510 from www.twilio.com/console }}"
auth_token = "{{ Auth Token from www.twilio.com/console }}"
client = TwilioRestClient(account_sid, auth_token)
message = clientmessages.create(body="You are the best!",
to="your phone number",
from_="your Twilio number")
print(message.sid)
I already install the twilio,using pip, why this problem happened,please help~
there is a copy of my code:
from twilio.rest import TwilioRestClient;
account_sid = "{{ ACCOUNT_SID }}" # Your Account SID from www.twilio.com/console
auth_token = "{{ AUTH_TOKEN }}" # Your Auth Token from www.twilio.com/console
client = TwilioRestClient(account_sid, auth_token)
message = client.messages.create(body="You are the best!",
to="+phonenumber", # Replace with your phone number
from_="+(201) ") # Replace with your Twilio number
print(message.sid)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…