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
sidorunique_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
{
"sid": "IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"to": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"channel_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2016-03-24T20:37:57Z",
"date_updated": "2016-03-24T20:37:57Z",
"last_updated_by": null,
"was_edited": false,
"from": "system",
"attributes": "{}",
"body": "Hello",
"index": 0,
"type": "text",
"media": null,
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
{
"sid": "IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"to": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"channel_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2016-03-24T20:37:57Z",
"date_updated": "2016-03-24T20:37:57Z",
"last_updated_by": null,
"was_edited": false,
"from": "system",
"attributes": "{}",
"body": "Hello",
"index": 0,
"type": "media",
"media": {
"sid": "MEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"size": 99999999999999,
"content_type": "application/pdf",
"filename": "hello.pdf"
},
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}