Skip to content

Webhook 投递 ​

本页是 webhook 的发出侧:MessageEagle 尝试发送了什么,以及你的端点如何响应。关于接收投递回执,请参阅英文文档 Webhooks & Delivery Reports。

操作Route
投递历史GET /organization/{organizationId}/webhook-deliveries
重新投递POST /organization/{organizationId}/webhook-deliveries/{deliveryId}/replay
测试端点POST /webhook-test

{organizationId} 与你在 X-TenantID 中发送的值相同。

测试端点 ​

在接入真实事件之前,先向 URL 发一次请求,看看它如何响应。

bash
curl -X POST "$ME_BASE/webhook-test" \
  -H "API-Key: $ME_API_KEY" \
  -H "X-TenantID: $ME_TENANT" \
  -H "Content-Type: application/json" \
  -d '{
        "url": "https://example.com/hooks/me",
        "method": "POST",
        "headers": [{ "key": "X-Secret", "value": "s3cr3t" }],
        "body": { "ping": true }
      }'

success 不等于 2xx

success 只表示请求已完成,并不表示对方接受了它。请同时检查 status。