FeishuCallbackController
@RestController @RequestMapping("/api/channels/feishu") public class FeishuCallbackController
源码Source
io/agentscope/extensions/channel/feishu/FeishuCallbackController.java:51–178Feishu 回调控制器,把智能体接入外部消息渠道与企业平台。位于 io.agentscope.extensions.channel.feishu 包。核心成员包括 callback、FeishuCallbackController。
Handles the Feishu URL verification handshake and event-subscription callbacks.
Single endpoint at POST /api/channels/feishu/{channelId}/callback. The body is JSON;
either a plain envelope or {"encrypt":"<base64>"}. The controller:
-
Decrypts the envelope when
encryptKeyis configured -
Verifies the
X-Lark-Signatureheader when present -
Echoes the URL verification
challengeon the verification handshake -
Deduplicates by
header.event_id -
Applies the bot-loop guard and dispatches to the channel
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public FeishuCallbackController() | 初始化 `FeishuCallbackController` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Mono<ResponseEntity<String>> callback(String channelId, String signature, String timestamp, String nonce, String rawBody) | 执行回调相关操作。 Performs the callback operation. |
构造器详情Constructor Detail
FeishuCallbackController
public FeishuCallbackController()
初始化 FeishuCallbackController 实例。
Creates a new instance.
源码Source
io/agentscope/extensions/channel/feishu/FeishuCallbackController.java:60–62方法详情Method Detail
callback
public Mono<ResponseEntity<String>> callback(String channelId, String signature, String timestamp, String nonce, String rawBody)
执行回调相关操作。
Performs the callback operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
channelId | String | 渠道标识(类型 `String`)。The channel id. |
signature | String | signature(类型 `String`)。The signature. |
timestamp | String | 时间戳(类型 `String`)。The timestamp. |
nonce | String | nonce(类型 `String`)。The nonce. |
rawBody | String | 原始正文(类型 `String`)。The raw body. |
Mono<ResponseEntity<String>>返回Mono>。Returns mono.
源码Source
io/agentscope/extensions/channel/feishu/FeishuCallbackController.java:69–177