Directly Download
POST/api/v2/instance/:instanceId/media/directly-download
Retrieves the binary file of a previously prepared media. Supports multiple formats such as images, videos, audios, etc.
Request
Path Parameters
instanceId stringrequired
ID of the instance.
Query Parameters
ttl TTL
Default value: 600000
Set a maximum time to wait for the request to be responded to.
- application/json
 
Body
required
Example:
{
  "contentType": "image",
  "content": {
    "url": "https://mmg.whatsapp.net/v/t62.7118-24/11848240_269121205948171_939172297016564800_n.enc?ccb=11-4&oh=01_AdQUnT1dCk66oaCvAo1AXuQOw8aXW--V6PQQOUxOysHmPw&oe=652D4E40&_nc_sid=000000&mms3=true",
    "mimetype": "image/jpeg",
    "mediaKey": "EtkHwPvSijrLUj6c18dK3vtU+ONrCzMSYbOJYY0FqTw=",
    "directPath": "/v/t62.7118-24/11848240_269121205948171_939172297016564800_n.enc?ccb=11-4&oh=01_AdQUnT1dCk66oaCvAo1AXuQOw8aXW--V6PQQOUxOysHmPw&oe=652D4E40&_nc_sid=000000"
  }
}
contentType Content Typerequired
Default value: document | image | video | audio | sticker
content objectrequired
Responses
- 200
 - 401
 - 404
 - 500
 
Binary file - Media preview.
- application/octet-stream
 - application/pdf
 - image/jpeg
 - audio/ogg
 - video/mp4
 
- Schema
 
Schema
- string binary
 
- Schema
 
Schema
- string binary
 
- Schema
 
Schema
- string binary
 
- Schema
 
Schema
- string binary
 
- Schema
 
Schema
- string binary
 
UnauthorizedException
- application/json
 
- Schema
 - Example (from schema)
 
Schema
message string[]required
Default value: string,[object Object]
error stringrequired
statusCode numberrequired
{
  "message": [
    "string"
  ],
  "error": "string",
  "statusCode": 0
}
NotFoundException
- application/json
 
- Schema
 - Example (from schema)
 
Schema
message string[]required
Default value: string,[object Object]
error stringrequired
statusCode numberrequired
{
  "message": [
    "string"
  ],
  "error": "string",
  "statusCode": 0
}
InternalServerErrorException
- application/json
 
- Schema
 - Example (from schema)
 
Schema
message string[]required
Default value: string,[object Object]
error stringrequired
statusCode numberrequired
{
  "message": [
    "string"
  ],
  "error": "string",
  "statusCode": 0
}
Loading...