Reading
Download received media
GET
/v1/messages/:id/mediaIncoming photos, voice notes and documents are not downloaded until you ask.
Stream the file
GET https://api.api-supp.com/v1/messages/:id/media?chat_jid=…
Returns the file bytes with the right Content-Type. It opens inline by default; add &dl=1 to download it as an attachment.
bash
curl -o photo.jpg "https://api.api-supp.com/v1/messages/3EB0CB97F37F91F563B060/media?chat_jid=14155550132%40s.whatsapp.net" \
-H "Authorization: Bearer wat_YOUR_TOKEN"Prepare it on the server
POST https://api.api-supp.com/v1/messages/:id/download?chat_jid=…
Decrypts and stores the file, and returns its details. Calling it twice returns the same file.
json
{ "ok": true, "path": "…", "filename": "…", "media_type": "audio", "size": 15437 }Errors
400the message has no media, orchat_jidis missing404unknown message id502the file couldn't be decrypted