Baixar mídia recebida (arquivo)
curl --request GET \
--url https://api.notifique.dev/v1/whatsapp/messages/inbound/{id}/media/download \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.notifique.dev/v1/whatsapp/messages/inbound/{id}/media/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/whatsapp/messages/inbound/{id}/media/download"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/whatsapp/messages/inbound/{id}/media/download"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}"<string>"{
"success": false,
"error": "Bad Request",
"message": "This inbound message has no downloadable media (image, audio, or document).",
"code": "INBOUND_MEDIA_NOT_FETCHABLE"
}{
"success": false,
"error": "string",
"message": "string",
"code": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"note": "string"
}{
"success": false,
"error": "string",
"message": "string",
"code": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"note": "string"
}{
"success": false,
"error": "Forbidden",
"message": "This API key is not allowed to access this WhatsApp instance.",
"code": "INSTANCE_NOT_ALLOWED"
}{
"success": false,
"error": "Not Found",
"message": "Inbound message not found.",
"code": "NOT_FOUND"
}{
"success": false,
"error": "Bad Gateway",
"message": "Failed to download media from WhatsApp connection.",
"code": "BAD_GATEWAY"
}Mensagens
Baixar mídia recebida (arquivo)
Baixa a mídia como arquivo — ideal para salvar com curl ou scripts.
GET
/
v1
/
whatsapp
/
messages
/
inbound
/
{id}
/
media
/
download
Baixar mídia recebida (arquivo)
curl --request GET \
--url https://api.notifique.dev/v1/whatsapp/messages/inbound/{id}/media/download \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.notifique.dev/v1/whatsapp/messages/inbound/{id}/media/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/whatsapp/messages/inbound/{id}/media/download"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/whatsapp/messages/inbound/{id}/media/download"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}"<string>"{
"success": false,
"error": "Bad Request",
"message": "This inbound message has no downloadable media (image, audio, or document).",
"code": "INBOUND_MEDIA_NOT_FETCHABLE"
}{
"success": false,
"error": "string",
"message": "string",
"code": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"note": "string"
}{
"success": false,
"error": "string",
"message": "string",
"code": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"note": "string"
}{
"success": false,
"error": "Forbidden",
"message": "This API key is not allowed to access this WhatsApp instance.",
"code": "INSTANCE_NOT_ALLOWED"
}{
"success": false,
"error": "Not Found",
"message": "Inbound message not found.",
"code": "NOT_FOUND"
}{
"success": false,
"error": "Bad Gateway",
"message": "Failed to download media from WhatsApp connection.",
"code": "BAD_GATEWAY"
}Autorizações
ntfWaBearerAuthntfWaApiKeyHeader
API Key no header Authorization. Exemplo: Authorization: Bearer sk_live_xxxxx
Parâmetros de caminho
ID do inbound (mesmo inboundId do webhook ou de GET /v1/whatsapp/messages/inbound/inboundId).
Exemplo:
"clxxinbound001"
Resposta
Arquivo de mídia (image, audio ou document). Resposta binária (não JSON). Use Content-Type e Content-Disposition do header.
The response is of type file.
Esta página foi útil?

