python免费发送短信
Posted Jary
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python免费发送短信相关的知识,希望对你有一定的参考价值。
pip install twilio
from twilio.rest import Client # Your Account SID from twilio.com/console account_sid = "AC3xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # Your Auth Token from twilio.com/console auth_token = "xxxxxxxxxxxxxxxxxxxxxxxxxx" def send(): client = Client(account_sid, auth_token) # Your new Phone Number is +16184000273 message = client.messages.create( to="+8615112341234", from_="+16184000273", body="这是一条测试短信!") print(message.sid) if __name__ == ‘__main__‘: send()
以上是关于python免费发送短信的主要内容,如果未能解决你的问题,请参考以下文章