§ API REFERENCE

查询 Webhook订阅

GET/webhook-endpointsscope: webhook:manage

列出当前 APP 的出站 Webhook订阅;读响应永不返回签名密钥。

鉴权:Authorization: Bearer <access_token>。
§ 1

请求信息

GET https://api.lingxiguangnian.com/api/open/v1/webhook-endpoints

请求头

参数类型必填说明
AuthorizationstringBearer <access_token>。由 POST /token 换取,有效期 2 小时;api_secret 不得直连业务端点(→ 401)。
§ 2

调用示例

curl "https://api.lingxiguangnian.com/api/open/v1/webhook-endpoints" -H "Authorization: Bearer oat_xxxxxxxxxxxxxxxx"
§ 3

返回结果

返回字段

参数类型必填说明
subscriptions[]object[]id、target_url、event_types、status、description及时间;无 signing_secret。
{ "success": true, "data": { "subscriptions": [{ "id": "11111111-1111-4111-8111-111111111111", "target_url": "https://partner.example.com/webhooks/mbc", "event_types": ["report.generated"], "status": "ACTIVE" }] } }
§ 4

端点错误码

通用鉴权、scope 与限流错误见「使用概述」;下表为本端点专属错误。

HTTPerror_code触发条件
500open_api.webhook_query_failedWebhook订阅查询失败。

契约真源:apps/m-master/src/app/api/open/v1/webhook-endpoints/route.ts