Table of Contents

This endpoint is deprecated and will be removed.

Use the get-messagemedia method

Working with media files (deprecated)

Returns a media file attached to a received message. If a message has media, hasMedia is true and mediaKey is the identifier this endpoint expects.

Request command

To request media, send a POST request to:

https://whatsgate.org/api/v1/get-media

Request body object

The request body must contain:

{
  "WhatsappID": "YOUR_WHATSAPP_ID",
  "mediaKey": "TuM9wXQZBmERUCzwnIZe80GwZ5lPDIDsNE+vewnAxho="
}

Response object

Successful response object

{
  "result": "OK",
  "media": {
    "mimetype": "image/jpeg",
    "filename" : "image.jpg",
    "data": "<base64_encoded_data>"
  }
}

In the response, the “media” field contains a media file object