跳到主要内容
Sursa Developers

事件 · 人员与访问权限

app.revoked

应用授权已撤销

员工对 OAuth 应用的授权已被撤销(data.app: id, name; data.authorization_id, data.user_id, data.scopes; data.reason: user | admin | app_deleted)。

对象类型
app
投递对象
具有 admin 角色的 Webhook

有效负载

对象:EventAppRevoked

  • idstring必填

    事件 ID(evt_…),也会作为 webhook-id 头发送。可用于丢弃重复的投递。

  • typestring必填

    可选值: app.revoked

  • created_atstring (date-time)必填

    变更发生的时间(UTC)。

  • org_idinteger必填
  • api_versionstring必填

    data 结构定义的契约版本。

  • sequenceinteger

    在该 Webhook 内的投递序号(测试事件不返回)。

  • objectWebhookEventObject必填
  • payloadstring必填

    thin 表示没有 data:请通过 API 读取对象。

    可选值: fullthin

  • dataobject
    字段
    • appobject必填

      应用:ID 和名称。

      字段
      • idstring
      • namestring
    • authorization_idinteger必填

      员工授权。

    • user_idinteger必填

      授权该应用的员工。

    • scopesarray of string必填

      授权的权限范围。

    • reasonstring必填

      user、admin 或 app_deleted。

  • testboolean必填

    由 POST /v1/webhooks/{webhook_id}/test 发送的测试事件。

投递示例

{
  "id": "evt_0123456789abcdef0123456789abcdef",
  "type": "app.revoked",
  "created_at": "2026-10-24T10:00:03Z",
  "org_id": 1,
  "api_version": "1.62.0",
  "sequence": 1042,
  "object": {
    "type": "app",
    "id": "app_8f14e45fceea167a5a36dedd4bea2543"
  },
  "payload": "full",
  "data": {
    "app": {
      "id": "app_8f14e45fceea167a5a36dedd4bea2543",
      "name": "CRM sync"
    },
    "authorization_id": 12,
    "user_id": 7,
    "scopes": [
      "cards:read",
      "search"
    ],
    "reason": "user"
  },
  "test": false
}

接收事件

每次投递都是向 Webhook 接收地址发送的 POST 请求,请求体就是这个 JSON。先验证 webhook-signature 头(Standard Webhooks),再信任请求体;在几秒内返回 2xx 状态,之后再处理。投递到同一个 Webhook 的事件保持原有顺序;投递失败时按逐渐拉长的间隔重试。

随时可能新增事件类型和字段:跳过不认识的类型和字段。

同样的事件在事件记录中保留 30 天 →