Download media
POST
/downloadMedia/{media_id}Downloads a file in one step, using its media ID. The response body is the file itself, with its type in the Content-Type header. Save it to your own storage.
Authorization
apiKey apikey<token>
Your HostMentor API key, from the dashboard under Messaging → WhatsApp → API keys.
In: header
Path Parameters
media_id*string
ID of the file, from Upload media or an incoming message webhook.
Query Parameters
phone_number_id*string
ID of your WhatsApp number that uploaded or received the file.
Response Body
application/octet-stream
application/json
application/json
application/json
curl -X POST "https://wa.hostmentor.com/v3/downloadMedia/1166846181421424?phone_number_id=106540352242922" \ -H "apikey: YOUR_API_KEY""string"