Sample - Twilio API
GET/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media.json

List message media

Lists media resources associated with a specific message. Use the date filters to select media created on, before, or after a GMT date, and use the pagination parameters to retrieve results in pages.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

8 parameters
AccountSidstringrequired
The account SID associated with the media resources, matching the 34-character `AC` SID format.
MessageSidstringrequired
The SID of the message whose media resources to list, matching the 34-character `SM` or `MM` SID format.
DateCreatedstringoptional
Filters media to the specified creation date in GMT; use a date value such as `YYYY-MM-DD`.
DateCreated<stringoptional
Filters media created on or before the specified GMT date.
DateCreated>stringoptional
Filters media created on or after the specified GMT date.
PageSizeintegeroptional
The number of media resources to return per page. Defaults to 50 when omitted and must be between 1 and 1000.
Pageintegeroptional
The zero-based page index used for client-side pagination. Must be zero or greater when supplied.
PageTokenstringoptional
The pagination token provided by the API for retrieving a specific subsequent page.

1 status code
200Returns a paginated object containing media resources in `media_list`, along with page indexes, resource counts, and navigation URIs.
endintegeroptional
first_page_uristringoptional
next_page_uristringoptional
pageintegeroptional
page_sizeintegeroptional
previous_page_uristringoptional
startintegeroptional
uristringoptional
media_listarray<object>optional

Error handling

AccountSid must be a 34-character SID beginning with AC, and MessageSid must begin with SM or MM. PageSize must be between 1 and 1000, Page must be zero or greater, and date filters must use the declared date-time format.