【问题标题】:Get message content from Twilio Message从 Twilio Message 获取消息内容
【发布时间】:2019-11-26 20:22:57
【问题描述】:

我正在尝试阅读 twilio 消息的消息正文。我能够阅读 message.tomessage.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_)

【问题讨论】:

    标签: python sms twilio wix3.8


    【解决方案1】:

    这里是 Twilio 开发者宣传员。

    您可以使用 message.body.

    让我知道这是否有帮助!

    【讨论】:

      【解决方案2】:

      print(message.body) 不工作吗?

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2017-01-19
        • 2013-04-02
        • 2021-06-27
        • 2021-01-20
        • 1970-01-01
        • 2022-09-23
        • 2020-09-05
        相关资源
        最近更新 更多