Im trying to read the message body of a twilio message. I am able to read the message.to and the message.from_ but I cant seem to figure out how to get the body. Below is my code. I purposely removed my credentials.
# 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_)
Does print(message.body) not work?