GET
Get Media
Download and decrypt media. Use a stored path, or chat_id + message_id from a webhook (decrypts .enc WhatsApp media using the session keys). Instance must be connected.
Webhook media URLs ending in .enc are encrypted. Do not download them directly — call get_media with chat_id + message_id (instance connected) to decrypt.
API endpoint
https://api.waclient.com/get_mediaExample:
curl -X GET \
'https://api.waclient.com/get_media' \
-G \
--data-urlencode 'path=6A4B02A1XXXX/media/1750000000000_image.jpg' \
--data-urlencode '[email protected]' \
--data-urlencode 'as_json=true' \
--data-urlencode 'instance_id=6A4B02A1XXXX' \
--data-urlencode 'access_token=EMCUH3NQQK8YXXXX'Response
{
"status": "success",
"message": "Success",
"data": {
"chat_id": "[email protected]",
"message_id": "ACD675B82EF67ACCABE4E100AC0928B6",
"mime_type": "audio/ogg; codecs=opus",
"base64": "...",
"size": 5035
}
}| Parameter | Description |
|---|---|
| path | Relative storage path (instance_id/media/...) (Optional) |
| chat_id | Required with message_id. Prefer phone JID (remoteJidAlt) when the webhook uses @lid. JID with @ — Phone: [email protected]. Group: 120363…@g.us. Channel: 120363…@newsletter. (Optional) |
| message_id | Message key.id from the webhook payload (Optional) |
| as_json | Return base64 JSON instead of binary (useful for .ogg audio) (Optional) |
| instance_id | Your instance ID |
| access_token | Your access token |