auto-save 2026-05-09 16:40 (~7)

This commit is contained in:
2026-05-09 16:40:34 +08:00
parent 211ce9de23
commit af00c61db6
7 changed files with 158 additions and 74 deletions

View File

@@ -3,7 +3,9 @@
双向桥接服务:
- `POST /feishu/events`:飞书事件回调。收到文本消息后后台调用 Hermes再发回飞书。
- `POST /feishu/events/{app_id}`:多个飞书应用共用桥服务时,按路径指定应用。
- `POST /feishu/notify`Hermes 或内部系统主动通知飞书。必须带 `Authorization: Bearer $FEISHU_NOTIFY_TOKEN``X-Hermes-Feishu-Token`
- `POST /feishu/notify/{app_id}`:主动通知时指定发消息的飞书应用,也可在 JSON 里传 `app_id`
- `GET /health`:健康检查。
## 凭证
@@ -13,7 +15,7 @@
## 飞书后台配置
1. 给自建应用开通消息相关权限,例如接收消息事件、获取与发送单聊/群组消息。
2. 事件订阅里添加请求地址:`https://hermes.kang-kang.com/feishu/events`
2. 事件订阅里添加请求地址:默认应用用 `https://hermes.kang-kang.com/feishu/events`;其它应用用 `https://hermes.kang-kang.com/feishu/events/{app_id}`
3. 如果启用事件加密,需要先给本服务补充解密支持;当前版本按明文事件回调处理。
4. 建议配置 `FEISHU_VERIFICATION_TOKEN`,并保持和飞书后台一致。
@@ -24,4 +26,9 @@ curl -X POST https://hermes.kang-kang.com/feishu/notify \
-H "Authorization: Bearer $FEISHU_NOTIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"receive_id_type":"chat_id","receive_id":"oc_xxx","text":"任务完成"}'
curl -X POST https://hermes.kang-kang.com/feishu/notify/cli_xxx \
-H "Authorization: Bearer $FEISHU_NOTIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"receive_id_type":"chat_id","receive_id":"oc_xxx","text":"任务完成"}'
```