AS AgentScopeAPI 手册 / API Reference

FeishuCallbackController

@RestController @RequestMapping("/api/channels/feishu") public class FeishuCallbackController
源码Source io/agentscope/extensions/channel/feishu/FeishuCallbackController.java:51–178

Feishu 回调控制器,把智能体接入外部消息渠道与企业平台。位于 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 encryptKey is configured

  • Verifies the X-Lark-Signature header when present

  • Echoes the URL verification challenge on 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
channelIdString渠道标识(类型 `String`)。The channel id.
signatureStringsignature(类型 `String`)。The signature.
timestampString时间戳(类型 `String`)。The timestamp.
nonceStringnonce(类型 `String`)。The nonce.
rawBodyString原始正文(类型 `String`)。The raw body.
返回Returns Mono<ResponseEntity<String>>
返回Mono>。Returns mono.
源码Source io/agentscope/extensions/channel/feishu/FeishuCallbackController.java:69–177
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.