Open Platform

Connect 统计回调(Webhook)

Connect 回调事件字段与发送行为

Connect 统计回调(Webhook)

本页面向已经在 Connect 注册表中配置 webhook 的服务提供方。

Connect webhook 用于回传用户在 Lime 中处理 Deep Link 的结果。

什么时候会发送

只有同时满足以下条件时,Lime 才会发送回调:

  1. relay 能在注册表中找到
  2. 该中转商配置了 webhook.callback_url
  3. callback_urlhttps://

如果任一条件不满足,Lime 会直接跳过,不会阻塞主流程。

状态类型

  • success 用户确认并成功保存 API Key
  • cancelled 用户取消添加
  • error 保存流程失败

Payload 字段

成功或取消时,Lime 会发送如下 JSON:

{
  "event": "connect",
  "status": "success",
  "relay_id": "your-relay",
  "ref_code": "campaign-2026",
  "key_prefix": "sk-abc12",
  "timestamp": "2026-04-19T10:00:00Z",
  "client": {
    "version": "x.y.z",
    "platform": "macos"
  }
}

错误时会额外包含:

{
  "event": "connect",
  "status": "error",
  "relay_id": "your-relay",
  "key_prefix": "sk-abc12",
  "timestamp": "2026-04-19T10:00:00Z",
  "client": {
    "version": "x.y.z",
    "platform": "windows"
  },
  "error_code": "SAVE_FAILED",
  "error_message": "failed to persist api key"
}

字段说明:

  • event 固定为 connect
  • statussuccess / cancelled / error
  • relay_id 中转商标识
  • ref_code 可选渠道标记,对应 Deep Link 中的 ref
  • key_prefix 仅保留前 7 位的脱敏 Key 前缀
  • timestamp UTC 时间
  • client.version Lime 当前版本
  • client.platformmacos / windows / linux
  • error_codeerror 时返回
  • error_messageerror 时返回

安全边界

  • Lime 不为该回调增加额外签名
  • 接收方应自行校验 https:// 来源、参数完整性与幂等
  • 若需要确认请求是否属于自己下发的 Key,可校验 key_prefix

重试行为

回调发送为异步行为,默认会按以下节奏重试:

  1. 立即发送
  2. 60 秒后重试
  3. 300 秒后重试
  4. 1800 秒后最后一次重试

发送失败不会阻塞用户在 Lime 中的主操作。

Copyright © 2026