Listar trazas del endpoint de Flow
Lo que NUESTRO proxy vio en las llamadas data_exchange de este Flow: la action de Meta, la screen, el outcome (FORWARDED, CUSTOMER_ERROR, NO_DESTINATION; trata el conjunto como abierto), el status HTTP que respondió tu webhook (null cuando no hubo respuesta), cuánto tardó y, en el camino de falla, los cuerpos intercambiados. Del más reciente al más antiguo. Permiso flows:read. La respuesta es Cache-Control: no-store.
⚠️ Sin paginación: devuelve las 50 trazas más recientes, y enviar page o pageSize es 400 FLOW_TRACES_NOT_PAGINATED, porque cada página devolvería las mismas filas. Cualquier otro parámetro de query se ignora.
⚠️ De vida corta: una traza se sirve durante 24 horas. Una lista vacía trae "notice": "FLOW_TRACES_RETENTION_WINDOW", porque [] puede significar “nunca se llamó” o “se llamó, y expiró”.
⛔ Los cuerpos se redactan por número. forwardedBody y customerBody son null en caso de éxito. En un número en RELAY_ONLY (o cuando el número detrás de una traza ya no se puede resolver) se reemplazan por "conteúdo indisponível"; outcome, httpStatus, durationMs y failureReason quedan intactos.
El Flow se resuelve dentro de la WABA de la clave; un Flow de otra WABA, o de otro tenant, es 404 FLOW_NOT_FOUND.
Requiere una clave con alcance de número. Una clave con alcance de tenant debe nombrar el número con el header x-whatsapp-number-id, o recibe 403 TENANT_SCOPE_NOT_ALLOWED.
curl --request GET \
--url https://pilotstatus.com.br/v1/flows/{id}/traces \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/flows/{id}/traces"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/flows/{id}/traces', 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/v1/flows/{id}/traces",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <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"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/flows/{id}/traces"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pilotstatus.com.br/v1/flows/{id}/traces")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/flows/{id}/traces")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body¿Esta página le ayudó?
curl --request GET \
--url https://pilotstatus.com.br/v1/flows/{id}/traces \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/flows/{id}/traces"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/flows/{id}/traces', 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/v1/flows/{id}/traces",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <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"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/flows/{id}/traces"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pilotstatus.com.br/v1/flows/{id}/traces")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/flows/{id}/traces")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body