Skip to main content
POST
Baixar mídia (unificado)
Baixa a mídia de uma mensagem recebida. O WhatsApp entrega mídias criptografadas; este endpoint descriptografa usando os metadados que chegam no webhook (media_key, mimetype, direct_path ou url, e os hashes). Defina base64: true para receber o conteúdo embutido na resposta, ou use async para downloads grandes em segundo plano.
Os campos necessários (media_key, mimetype, file_sha256 etc.) vêm no payload do webhook de mensagem recebida — repasse-os diretamente para cá.

Authorizations

Authorization
string
header
required

API Key para autenticação. Formato: <API_KEY>

Body

sessionId
string
required
Minimum string length: 1
media_key
string
required
Minimum string length: 1
mimetype
string
required
Minimum string length: 1
url
string
direct_path
string
file_enc_sha256
string
file_sha256
string
file_length
number
async
string
base64
boolean

Response

200

Resposta bem-sucedida