curl --request GET \
--url https://api.wizebot.com.br/v1/attachments/{media_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.wizebot.com.br/v1/attachments/{media_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.wizebot.com.br/v1/attachments/{media_id}';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://api.wizebot.com.br/v1/attachments/{media_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wizebot.com.br/v1/attachments/{media_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"data": {
"media_id": "wamid.HBgN",
"message_id": "a1",
"url": "https://arquivos.wizebot.com.br/...",
"expires_in": 900,
"mime_type": "image/jpeg",
"media_status": "completed"
},
"timestamp": "2026-09-13T03:20:00.000Z"
}{
"success": false,
"statusCode": 401,
"timestamp": "2026-09-13T03:20:00.000Z",
"path": "/api/v1/attachments/{id}",
"method": "GET",
"message": {
"error": "UNAUTHORIZED",
"message": "Invalid or missing API key."
},
"errorId": "ERR-MTUD0DBO-KKRMP8"
}{
"success": false,
"statusCode": 404,
"timestamp": "2026-09-13T03:20:00.000Z",
"path": "/api/v1/attachments/{id}",
"method": "GET",
"message": {
"error": "ATTACHMENT_NOT_FOUND",
"message": "Attachment not found."
},
"errorId": "ERR-MTUD0DBO-KKRMP8"
}{
"success": false,
"statusCode": 409,
"timestamp": "2026-09-13T03:20:00.000Z",
"path": "/api/v1/attachments/{id}",
"method": "GET",
"message": {
"error": "ATTACHMENT_NOT_READY",
"message": "Attachment is not available yet.",
"details": {
"media_id": "wamid.HBgN",
"media_status": "pending"
}
},
"errorId": "ERR-MTUD0DBO-KKRMP8"
}{
"success": false,
"statusCode": 429,
"timestamp": "2026-09-13T03:20:00.000Z",
"path": "/api/v1/attachments/{id}",
"method": "GET",
"message": {
"error": "RATE_LIMITED",
"message": "Too many requests."
},
"errorId": "ERR-MTUD0DBO-KKRMP8"
}{
"success": false,
"statusCode": 500,
"timestamp": "2026-09-13T03:20:00.000Z",
"path": "/api/v1/attachments/{id}",
"method": "GET",
"message": {
"error": "ATTACHMENT_URL_FAILED",
"message": "Failed to resolve attachment URL."
},
"errorId": "ERR-MTUD0DBO-KKRMP8"
}Resolver anexo
Troca o media_id de uma mensagem por uma URL temporária, válida por 15 minutos (expires_in: 900).
A leitura de mensagens nunca devolve URL nem caminho de armazenamento — só o identificador. Este é o lugar de resolvê-lo, e o link é curto de propósito: ele não deve circular, ser guardado nem repassado. Baixe o arquivo e resolva de novo quando precisar.
Mídia ainda em processamento responde 409 com o estado, em vez de uma URL que não funcionaria.
Só chame este endereço quando media.media_id não for null. Identificador nulo significa que não há arquivo registrado, e a chamada responderia 404.
Este recurso não depende do vínculo de identidade de canal: qualquer anexo da sua empresa resolve.
curl --request GET \
--url https://api.wizebot.com.br/v1/attachments/{media_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.wizebot.com.br/v1/attachments/{media_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.wizebot.com.br/v1/attachments/{media_id}';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://api.wizebot.com.br/v1/attachments/{media_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wizebot.com.br/v1/attachments/{media_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"data": {
"media_id": "wamid.HBgN",
"message_id": "a1",
"url": "https://arquivos.wizebot.com.br/...",
"expires_in": 900,
"mime_type": "image/jpeg",
"media_status": "completed"
},
"timestamp": "2026-09-13T03:20:00.000Z"
}{
"success": false,
"statusCode": 401,
"timestamp": "2026-09-13T03:20:00.000Z",
"path": "/api/v1/attachments/{id}",
"method": "GET",
"message": {
"error": "UNAUTHORIZED",
"message": "Invalid or missing API key."
},
"errorId": "ERR-MTUD0DBO-KKRMP8"
}{
"success": false,
"statusCode": 404,
"timestamp": "2026-09-13T03:20:00.000Z",
"path": "/api/v1/attachments/{id}",
"method": "GET",
"message": {
"error": "ATTACHMENT_NOT_FOUND",
"message": "Attachment not found."
},
"errorId": "ERR-MTUD0DBO-KKRMP8"
}{
"success": false,
"statusCode": 409,
"timestamp": "2026-09-13T03:20:00.000Z",
"path": "/api/v1/attachments/{id}",
"method": "GET",
"message": {
"error": "ATTACHMENT_NOT_READY",
"message": "Attachment is not available yet.",
"details": {
"media_id": "wamid.HBgN",
"media_status": "pending"
}
},
"errorId": "ERR-MTUD0DBO-KKRMP8"
}{
"success": false,
"statusCode": 429,
"timestamp": "2026-09-13T03:20:00.000Z",
"path": "/api/v1/attachments/{id}",
"method": "GET",
"message": {
"error": "RATE_LIMITED",
"message": "Too many requests."
},
"errorId": "ERR-MTUD0DBO-KKRMP8"
}{
"success": false,
"statusCode": 500,
"timestamp": "2026-09-13T03:20:00.000Z",
"path": "/api/v1/attachments/{id}",
"method": "GET",
"message": {
"error": "ATTACHMENT_URL_FAILED",
"message": "Failed to resolve attachment URL."
},
"errorId": "ERR-MTUD0DBO-KKRMP8"
}Authorizations
Chave de API no cabeçalho Authorization: Bearer SUA-CHAVE.
A API também aceita x-api-key: SUA-CHAVE e Authorization: ApiKey SUA-CHAVE — as três formas são equivalentes, inclusive para o limite de requisições.
A chave dá acesso total à conta e é de servidor para servidor: não a use em navegador ou aplicativo móvel.
Path Parameters
O media.media_id da mensagem.

