Obtener URL prefirmada de multimedia
Resuelve un registro de medio por id y devuelve una URL de descarga prefirmada temporal junto con los metadatos del medio.
curl --request POST \
--url https://pilotstatus.com.br/api/layer/evolution-v2/s3/getMediaUrl/{instance} \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"id": "12345",
"expiry": "3600"
}
'import requests
url = "https://pilotstatus.com.br/api/layer/evolution-v2/s3/getMediaUrl/{instance}"
payload = {
"id": "12345",
"expiry": "3600"
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: '12345', expiry: '3600'})
};
fetch('https://pilotstatus.com.br/api/layer/evolution-v2/s3/getMediaUrl/{instance}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pilotstatus.com.br/api/layer/evolution-v2/s3/getMediaUrl/{instance}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '12345',
'expiry' => '3600'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/api/layer/evolution-v2/s3/getMediaUrl/{instance}"
payload := strings.NewReader("{\n \"id\": \"12345\",\n \"expiry\": \"3600\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pilotstatus.com.br/api/layer/evolution-v2/s3/getMediaUrl/{instance}")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"12345\",\n \"expiry\": \"3600\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/api/layer/evolution-v2/s3/getMediaUrl/{instance}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"12345\",\n \"expiry\": \"3600\"\n}"
response = http.request(request)
puts response.read_body{
"mediaUrl": "https://s3.pilotstatus.com.br/evolution/evolution-instance/5511999999999@s.whatsapp.net/3EB0F8A1C2D3E4F5A6B7.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=EVOACCESSKEY%2F20260709%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260709T000000Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=4c1f0b2a9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2a",
"id": "clyz9k3m10001x8a1b2c3d4e5",
"fileName": "evolution-instance/5511999999999@s.whatsapp.net/3EB0F8A1C2D3E4F5A6B7.jpeg",
"type": "image",
"mimetype": "image/jpeg",
"createdAt": "2026-07-09T00:00:00.000Z",
"Message": {
"id": "clyz9k3m10000x8a1a0b1c2d3",
"key": {
"id": "3EB0F8A1C2D3E4F5A6B7",
"remoteJid": "5511999999999@s.whatsapp.net",
"fromMe": false
},
"pushName": "João Silva",
"participant": null,
"messageType": "imageMessage",
"message": {
"imageMessage": {
"url": "https://mmg.whatsapp.net/v/t62.7118-24/enc.jpg",
"mimetype": "image/jpeg",
"caption": "Segue a foto do produto",
"fileLength": "84213",
"height": 1280,
"width": 720
}
},
"contextInfo": null,
"source": "android",
"messageTimestamp": 1752019200,
"chatwootMessageId": null,
"chatwootInboxId": null,
"chatwootConversationId": null,
"chatwootContactInboxSourceId": null,
"chatwootIsRead": null,
"instanceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"webhookUrl": null,
"status": "DELIVERY_ACK",
"sessionId": null
}
}{
"status": 400,
"error": "Bad Request",
"message": "Invalid payload"
}Autorizaciones
El token de la instancia, enviado en el encabezado apikey: el token de la instancia Evolution V2 que migraste en el panel (Números → Conectar → Migrar), o el token propio de la instancia de Pilot Status; y debe pertenecer a la {instance} de la ruta. Una clave de API ps_ de Pilot Status NO se acepta (404 Instance not found). Este es el único encabezado que lee el layer Evolution V2: Authorization: Bearer y x-api-key no se aceptan, y una solicitud sin apikey recibe 401.
Parámetros de ruta
Cuerpo
Respuesta
Éxito: cuerpo de respuesta nativo del proveedor.
Un único registro de medio más una URL prefirmada recién generada para descargar el objeto de S3/MinIO.
¿Esta página le ayudó?
curl --request POST \
--url https://pilotstatus.com.br/api/layer/evolution-v2/s3/getMediaUrl/{instance} \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"id": "12345",
"expiry": "3600"
}
'import requests
url = "https://pilotstatus.com.br/api/layer/evolution-v2/s3/getMediaUrl/{instance}"
payload = {
"id": "12345",
"expiry": "3600"
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: '12345', expiry: '3600'})
};
fetch('https://pilotstatus.com.br/api/layer/evolution-v2/s3/getMediaUrl/{instance}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pilotstatus.com.br/api/layer/evolution-v2/s3/getMediaUrl/{instance}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '12345',
'expiry' => '3600'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/api/layer/evolution-v2/s3/getMediaUrl/{instance}"
payload := strings.NewReader("{\n \"id\": \"12345\",\n \"expiry\": \"3600\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pilotstatus.com.br/api/layer/evolution-v2/s3/getMediaUrl/{instance}")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"12345\",\n \"expiry\": \"3600\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/api/layer/evolution-v2/s3/getMediaUrl/{instance}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"12345\",\n \"expiry\": \"3600\"\n}"
response = http.request(request)
puts response.read_body{
"mediaUrl": "https://s3.pilotstatus.com.br/evolution/evolution-instance/5511999999999@s.whatsapp.net/3EB0F8A1C2D3E4F5A6B7.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=EVOACCESSKEY%2F20260709%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260709T000000Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=4c1f0b2a9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2a",
"id": "clyz9k3m10001x8a1b2c3d4e5",
"fileName": "evolution-instance/5511999999999@s.whatsapp.net/3EB0F8A1C2D3E4F5A6B7.jpeg",
"type": "image",
"mimetype": "image/jpeg",
"createdAt": "2026-07-09T00:00:00.000Z",
"Message": {
"id": "clyz9k3m10000x8a1a0b1c2d3",
"key": {
"id": "3EB0F8A1C2D3E4F5A6B7",
"remoteJid": "5511999999999@s.whatsapp.net",
"fromMe": false
},
"pushName": "João Silva",
"participant": null,
"messageType": "imageMessage",
"message": {
"imageMessage": {
"url": "https://mmg.whatsapp.net/v/t62.7118-24/enc.jpg",
"mimetype": "image/jpeg",
"caption": "Segue a foto do produto",
"fileLength": "84213",
"height": 1280,
"width": 720
}
},
"contextInfo": null,
"source": "android",
"messageTimestamp": 1752019200,
"chatwootMessageId": null,
"chatwootInboxId": null,
"chatwootConversationId": null,
"chatwootContactInboxSourceId": null,
"chatwootIsRead": null,
"instanceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"webhookUrl": null,
"status": "DELIVERY_ACK",
"sessionId": null
}
}{
"status": 400,
"error": "Bad Request",
"message": "Invalid payload"
}