diff --git a/website/docs/user-guide/messaging/feishu.md b/website/docs/user-guide/messaging/feishu.md index a0dac1bb3b..7e7bbbde49 100644 --- a/website/docs/user-guide/messaging/feishu.md +++ b/website/docs/user-guide/messaging/feishu.md @@ -292,7 +292,7 @@ This is also how **command approval** works — when the agent needs to run a da ### Required Feishu App Configuration -Interactive cards require **four** configuration steps in the Feishu Developer Console. Missing any of them causes error **200340** when users click card buttons. +Interactive cards need the following configuration in the Feishu Developer Console. The usual symptom of a gap here is error **200340** when users click card buttons. 1. **Subscribe to the card action callback (not an event):** In **Development Configuration > Events and Callbacks**, open the **Callback Configuration** tab — it is separate from the **Event Configuration** tab where `im.message.receive_v1` lives — and add `card.action.trigger` under *Subscribed Callbacks*. Adding it as an event does not deliver button clicks. @@ -307,10 +307,10 @@ Interactive cards require **four** configuration steps in the Feishu Developer C Callback changes only take effect after **Version Management > Create version** is published (and approved, for enterprise apps). Feishu's own description of 200340 is "the application has not configured the card callback address or the configured address is invalid … ensure that you have created and published the latest version of the app". :::warning -Without all four steps, Feishu will successfully *send* interactive cards (sending only requires `im:message:send` permission), but clicking any button returns error 200340. The card appears to work — the error only surfaces when a user interacts with it, and the click never reaches Hermes (nothing is logged), because Feishu rejects it before delivering the callback. +Without a published card callback, Feishu will still successfully *send* interactive cards (sending only requires `im:message:send` permission), but clicking any button returns error 200340. The card appears to work — the error only surfaces when a user interacts with it, and the click never reaches Hermes (nothing is logged), because Feishu rejects it before delivering the callback. ::: -Error codes 200672 / 200673 mean the callback *did* reach Hermes and Feishu rejected the response payload; those are adapter bugs — please file an issue with the gateway log. +Error codes 200672 / 200673 indicate the callback *did* reach Hermes and Feishu rejected the response; if you see them, please file an issue with the matching `gateway.log` lines. ## Document Comment Intelligent Reply diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/messaging/feishu.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/messaging/feishu.md index 8a295b128d..f0d6a1608b 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/messaging/feishu.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/messaging/feishu.md @@ -257,19 +257,24 @@ Gateway 驱动的更新提示使用原生飞书 `Yes` / `No` 卡片,而非回 ### 飞书应用所需配置 -交互式卡片需要在飞书开发者控制台完成**三项**配置。缺少任何一项,用户点击卡片按钮时将出现错误 **200340**。 +交互式卡片需要在飞书开发者控制台完成以下配置。配置缺失时最常见的症状是用户点击卡片按钮出现错误 **200340**。 -1. **订阅卡片操作事件:** - 在 **事件订阅** 中,将 `card.action.trigger` 添加到已订阅事件。 +1. **订阅卡片操作回调(不是事件):** + 在 **开发配置 > 事件与回调** 中,打开 **回调配置** 标签页——它与放置 `im.message.receive_v1` 的 **事件配置** 标签页是分开的——在「已订阅回调」下添加 `card.action.trigger`。把它当作事件添加不会投递按钮点击。 -2. **启用交互式卡片能力:** - 在 **应用功能 > 机器人** 中,确保 **交互式卡片** 开关已启用。这告知飞书你的应用可以接收卡片操作回调。 +2. **设置回调的接收方式:** + 在同一标签页中,Hermes 以 `websocket` 模式运行时选择 **长连接**(Lark SDK 通过现有连接接收回调);webhook 模式则填写请求地址(与事件 webhook 相同的端点,例如 `https://your-server:8765/feishu/webhook`)。飞书必须能够访问并解析该地址,否则点击会返回 200342/200343。 -3. **配置卡片请求 URL(仅 webhook 模式):** - 在 **应用功能 > 机器人 > 消息卡片请求网址** 中,将 URL 设置为与事件 webhook 相同的端点(例如 `https://your-server:8765/feishu/webhook`)。WebSocket 模式下,SDK 会自动处理此项。 +3. **启用交互式卡片能力:** + 在 **应用功能 > 机器人** 中,确保 **交互式卡片** 开关已启用。 + +4. **发布新版本:** + 回调配置只有在 **版本管理与发布 > 创建版本** 并发布(企业应用还需审核通过)后才会生效。飞书对 200340 的官方描述是「应用未配置卡片回调地址或配置的地址无效……请确认已创建并发布最新版本」。 :::warning -缺少以上任意一步,飞书将成功*发送*交互式卡片(发送仅需 `im:message:send` 权限),但点击任意按钮将返回错误 200340。卡片看起来正常——错误仅在用户与其交互时才会出现。 +没有已发布的卡片回调时,飞书仍会成功*发送*交互式卡片(发送仅需 `im:message:send` 权限),但点击任意按钮将返回错误 200340。卡片看起来正常——错误仅在用户与其交互时才会出现,并且点击不会到达 Hermes(`gateway.log` 中没有任何记录),因为飞书在投递回调之前就拒绝了它。 + +错误码 200672 / 200673 表示回调*确实*到达了 Hermes 而飞书拒绝了响应;如果遇到,请附上对应的 `gateway.log` 日志提交 issue。 ::: ## 文档评论智能回复