Python SMS phone alarm

sid and token to make their own https://www.twilio.com/try-twilio registered twilio account application is free from the back of the phone is official

Looking directly at the script

# - * - conding: - * - utf8
twilio.rest Import Client from
sending #twilio company SMS Trial
# Your SID from the Account twilio.com/console
account_sid = "***********"      
# Your Token from twilio.com/console auth
auth_token = "****************************"

client = Client(account_sid, auth_token)

message = client.messages.create(
to="+8618534342346",
from_="+14243342342",
body="Hello from Python!")
#电话
# call = client.calls.create(
# to="+86184243242342436",
# from_="+1201842423423062",
# url="https://demo.twilio.com/welcome/voice/voice.xml"
# )
#
# print(call.sid)
print(message.sid)
~

Guess you like

Origin www.cnblogs.com/musen/p/11528062.html