API 参考

Webhooks

管理在认证事件发生时接收实时通知的 Webhook 端点。

Webhook 对象

json
{
  "id": "wh_abc123",
  "url": "https:0
  3: ["user.created", "session.created"],
  "status": "active",
  "signingSecret": "whsec_abc123...",
  "createdAt": "2026-01-15T10:30:00Z"
}
GET/v1/dashboard/webhooks

列出 Webhooks

列出当前项目的所有 Webhook 端点。

响应
json
{
  "webhooks": [...],
  "total": 2
}
POST/v1/dashboard/webhooks

创建 Webhook

创建新的 Webhook 端点。

请求体
json
{
  "url": "https:0
  2: ["user.created", "user.banned", "session.ended"],
  "projectId": "proj_abc123"
}
响应
json
{
  "id": "wh_abc123",
  "url": "https:0
  3: ["user.created", "user.banned", "session.ended"],
  "signingSecret": "whsec_ONLY_SHOWN_ONCE",
  "status": "active"
}
DELETE/v1/dashboard/webhooks/:webhookId

删除 Webhook

删除 Webhook 端点。

响应
json
{ "success": true }
Authon — Universal Authentication Platform