Read a list of Media resources associated with a specific Message resource
The Media subresource of a Message resource represents a piece of media, such as an image, that is associated with the Message.
Read a list of Media resources associated with a specific Message resource
Path parameters
-
The SID of the Account that is associated with the Media resources.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^AC[0-9a-fA-F]{32}$
. -
The SID of the Message resource that is associated with the Media resources.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^(SM|MM)[0-9a-fA-F]{32}$
.
Query parameters
-
Only include Media resources that were created on this date. Specify a date as
YYYY-MM-DD
in GMT, for example:2009-07-06
, to read Media that were created on this date. You can also specify an inequality, such asStartTime<=YYYY-MM-DD
, to read Media that were created on or before midnight of this date, andStartTime>=YYYY-MM-DD
to read Media that were created on or after midnight of this date. -
Only include Media resources that were created on this date. Specify a date as
YYYY-MM-DD
in GMT, for example:2009-07-06
, to read Media that were created on this date. You can also specify an inequality, such asStartTime<=YYYY-MM-DD
, to read Media that were created on or before midnight of this date, andStartTime>=YYYY-MM-DD
to read Media that were created on or after midnight of this date. -
Only include Media resources that were created on this date. Specify a date as
YYYY-MM-DD
in GMT, for example:2009-07-06
, to read Media that were created on this date. You can also specify an inequality, such asStartTime<=YYYY-MM-DD
, to read Media that were created on or before midnight of this date, andStartTime>=YYYY-MM-DD
to read Media that were created on or after midnight of this date. -
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Minimum value is
1
, maximum value is1000
. -
The page index. This value is simply for client state.
Minimum value is
0
. -
The page token. This is provided by the API.
curl \
--request GET 'https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media.json' \
--user "username:password"
{
"end": 0,
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media.json?PageSize=50&Page=0",
"page": 0,
"start": 0,
"total": 1,
"num_pages": 1,
"page_size": 50,
"media_list": [
{
"sid": "MEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media/MEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
"parent_sid": "SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"content_type": "image/jpeg",
"date_created": "Sun, 16 Aug 2015 15:53:54 +0000",
"date_updated": "Sun, 16 Aug 2015 15:53:55 +0000"
}
],
"last_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media.json?PageSize=50&Page=0",
"next_page_uri": null,
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media.json?PageSize=50&Page=0",
"previous_page_uri": null
}
{
"end": 0,
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media.json?PageSize=50&Page=0",
"page": 0,
"start": 0,
"total": 1,
"num_pages": 1,
"page_size": 50,
"media_list": [],
"last_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media.json?PageSize=50&Page=0",
"next_page_uri": null,
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media.json?PageSize=50&Page=0",
"previous_page_uri": null
}