twilio给自己发短信

使用python的twilio给自己发短信
1.申请账号、虚拟电话号
1.注册地址:https://www.twilio.com
sign up, 人机验证,邮箱验证,验证接收短信的电话号码。获得自己的虚拟号码,获得账号
在这里插入图片描述
2.pip install twilio

# -*- coding: utf-8 -*-
"""
用于发送短信
需要pip install twilio给自己发短信
需要申请账号
2020.8.29
"""
from twilio.rest import Client
# Your Account SID from twilio给自己发短信.com/console
account_sid = "AC617c97349930d8113d700acbd66c7e3e"
# Your Auth Token from twilio给自己发短信.com/console
auth_token  = "31d2866c0c58bc71832a33e749a32ff6"

client = Client(account_sid, auth_token)
message = client.messages.create(
    # 这里中国的号码前面需要加86
    to="+8613286260996",
    from_=&#

猜你喜欢

转载自blog.csdn.net/qq_43328166/article/details/108299993