Utilitários
GET /v1/me e POST /v1/echo — sanity checks de auth, quota e idempotência sem disparar nada real.
Endpoints para verificar o encadeamento auth → quota → idempotência sem disparar nada real. Úteis em smoke tests pós-deploy.
GET /v1/me
Retorna a identidade da chave autenticada.
Resposta 200:
Resposta 200
{ "userId": "usr_...", "apiKeyId": "key_..." } curl https://api.wablastmessage.com/v1/me \
-H "Authorization: Bearer wak_sua_chave"const res = await fetch('https://api.wablastmessage.com/v1/me', {
headers: { 'Authorization': 'Bearer ' + process.env.WABLAST_API_KEY },
});
console.log(res.status, await res.json());import os, requests
res = requests.get(
'https://api.wablastmessage.com/v1/me',
headers={'Authorization': 'Bearer ' + os.environ['WABLAST_API_KEY']},
)
print(res.status_code, res.json())<?php
$ch = curl_init('https://api.wablastmessage.com/v1/me');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . getenv('WABLAST_API_KEY'),
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$res = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_HTTP_CODE) . " " . $res; POST /v1/echo
Ecoa o body (201).
Resposta 201:
Resposta 201
{ "echo": { "qualquer": "json" } } Útil para testar Idempotency-Key: a segunda chamada com a mesma chave retorna o body original + header Idempotent-Replayed: true.