W2A
Documentation engine

Download medias

There's a lib for nodejs here: Click here

Engine: baileys (JS)

You are viewing Baileys docs. Baileys uses camelCase method names (sendMessage, groupCreate) and JSON message shapes — see Non-Media/Media Messages examples below. Responses are JSON-serialized Baileys WAMessage objects. Persistence: Mongo connections-auth collection.

After you receive a webhook event for a media message, call downloadMediaMessage with the full message object as params[0]. The endpoint returns the raw bytes (application/octet-stream) — base64-decode them client-side.

Read the details in Requests.


Download a media

Send the message object received via webhook as params[0]:

{
  "connectionId": "YOUR_CONNECTION_ID",
  "method": "downloadMediaMessage",
  "params": [
    "MESSAGE_OBJECT"
  ]
}