Skip to main content

Directly Download

POST 

https://{127.0.0.1:8083}/api/v2/instance/:instanceId/media/directly-download

Authorization: Json Web Token

name: Json Web Tokentype: httpscheme: bearerbearerFormat: jwtdescription: It is an **HTTP** authentication scheme that involves security tokens called **bearer tokens**.

**BearerFormat:** JWTin: header

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.

Body

required

Example: <pre> { "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" } } </pre>

    contentType Content Typerequired

    Default value: document | image | video | audio | sticker

    content objectrequired

Responses

Binary file - Media preview.

Schema
  • string binary
curl -L -g -X POST 'https://{127.0.0.1:8083}/api/v2/instance/:instanceId/media/directly-download' \
-H 'Content-Type: application/json' \
-H 'Accept: application/octet-stream' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"contentType": "document | image | video | audio | sticker",
"content": {}
}'
Request Collapse all
Base URL
https://{127.0.0.1:8083}
Auth
Parameters
— pathrequired
— query
Body required
{
"contentType": "document | image | video | audio | sticker",
"content": {}
}
ResponseClear

Click the Send API Request button above and see the response here!