Fetch a single Media resource associated with a specific Message resource

GET /2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{Sid}.json

The Media subresource of a Message resource represents a piece of media, such as an image, that is associated with the Message.

Fetch a single Media resource associated with a specific Message resource

Path parameters

  • AccountSid string Required

    The SID of the Account associated with the Media resource.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

  • MessageSid string Required

    The SID of the Message resource that is associated with the Media resource.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^(SM|MM)[0-9a-fA-F]{32}$.

  • Sid string Required

    The Twilio-provided string that uniquely identifies the Media resource to fetch.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^ME[0-9a-fA-F]{32}$.

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • account_sid string | null

      The SID of the Account associated with this Media resource.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • content_type string | null

      The default MIME type of the media, for example image/jpeg, image/png, or image/gif.

    • date_created string(date-time-rfc-2822) | null

      The date and time in GMT when this Media resource was created, specified in RFC 2822 format.

    • date_updated string(date-time-rfc-2822) | null

      The date and time in GMT when this Media resource was last updated, specified in RFC 2822 format.

    • parent_sid string | null

      The SID of the Message resource that is associated with this Media resource.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^(SM|MM)[0-9a-fA-F]{32}$.

    • sid string | null

      The unique string that identifies this Media resource.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^ME[0-9a-fA-F]{32}$.

    • uri string | null

      The URI of this Media resource, relative to https://api.twilio.com.

GET /2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{Sid}.json
curl \
 --request GET 'https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{Sid}.json' \
 --user "username:password"
Response examples (200)
{
  "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"
}