Fetch message
Individual chat messages
Path parameters
-
The SID of the Service to fetch the Message resource from.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^IS[0-9a-fA-F]{32}$
. -
The SID of the Channel the Message resource to fetch belongs to. This value can be the Channel resource's
sid
orunique_name
. -
The SID of the Message resource to fetch.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^IM[0-9a-fA-F]{32}$
.
GET
/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}
curl \
--request GET 'https://chat.twilio.com/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}' \
--user "username:password"
Response examples (200)
Fetch
{
"to": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sid": "IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"body": "Hello",
"from": "system",
"type": "text",
"index": 0,
"media": null,
"attributes": "{}",
"was_edited": false,
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"channel_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2016-03-24T20:37:57Z",
"date_updated": "2016-03-24T20:37:57Z",
"last_updated_by": null
}
{
"to": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sid": "IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"body": "Hello",
"from": "system",
"type": "media",
"index": 0,
"media": {
"sid": "MEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"size": 99999999999999,
"filename": "hello.pdf",
"content_type": "application/pdf"
},
"attributes": "{}",
"was_edited": false,
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"channel_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2016-03-24T20:37:57Z",
"date_updated": "2016-03-24T20:37:57Z",
"last_updated_by": null
}