文章介绍
本文主要讲述如何利用Python向自己或他人发送短信
try:
from twilio.rest import Client
account_sid = 'AC4255a1ab82ae-----e7b41b2f87e0'
auth_token = '2862b219003-----f7e4a9e'
client = Client(account_sid,auth_token)
message = client.messages.create(to="+861580--132",from_="120293--830",body="This is a SMS")
print('SMS Success!')
except Exception as e:
print(f'Failed! reason:{e}')