API docsLog inCreate account
Reading

Download received media

GET/v1/messages/:id/media

Incoming 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

  • 400 the message has no media, or chat_jid is missing
  • 404 unknown message id
  • 502 the file couldn't be decrypted