Download Media

GET https://graph.facebook.com/{{Version}}/{{Media-URL}}

When you retrieve a media URL through the GET Media endpoint, you must use a User Access Token to download media content from the URL. If you click the URL from a browser, you will get an access error.

Note : all media URLs will expire after 5 minutes, you need to retrieve the media URL again if it expires.

Prerequisites

  • User Access Token with whatsapp_business_messaging permission
  • A media URL obtained from retrieving media url endpoint

Response:

If successful, you receive the binary data of media saved in media_file , response headers contain a content-type header to indicate the mime type of returned data. For more information, see Supported Media Types .

If media fails to download, you receive a 404 Not Found response code. In that case, we recommend that you try to Retrieve Media URL and download again. If doing so doesn't resolve the issue, please try to renew the USER_ACCESS_TOKEN then retry downloading the media.

HEADERS

| Key | Datatype | Required | Description |

RESPONSES

status: OK

""