【发布时间】:2019-11-26 20:22:57
【问题描述】:
我正在尝试阅读 twilio 消息的消息正文。我能够阅读 message.to 和 message.from_ 但我似乎无法弄清楚如何得到身体。下面是我的代码。我故意删除了我的凭据。
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
# DANGER! This is insecure. See http://twil.io/secure
account_sid = "AC#############################"
auth_token = "1##########################3"
client = Client(account_sid, auth_token)
# Get Message
message = client.messages('SM17ded763ce04f2cbbd343a39a243df').fetch()
print(message.to)
print(message.from_)
【问题讨论】: