Obter URL de mídia pré-assinada
Resolve um registro de mídia pelo id e retorna uma URL de download pré-assinada temporária junto com os metadados da mídia.
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"
}Autorizações
Your Pilot Status API key (ps_...). Evolution GO also accepts Authorization: Bearer <key>.
Parâmetros de caminho
O nome de exibição do número no painel do Pilot Status.
Corpo
Resposta
Sucesso — corpo de resposta nativo do provedor.
A single media record plus a freshly generated presigned URL for downloading the object from S3/MinIO.
Presigned URL to download the stored media object (valid for the requested expiry, in seconds).
Media record id (cuid).
Object key / path of the file stored in the S3/MinIO bucket.
Media category (e.g. image, video, audio, document, sticker).
MIME type of the stored file.
Date the media record was created.
The Message this media belongs to.
Show child attributes
Show child attributes
Esta página foi útil?
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"
}