Class FeishuCallbackController

java.lang.Object
io.agentscope.extensions.channel.feishu.FeishuCallbackController

@RestController @RequestMapping("/api/channels/feishu") public class FeishuCallbackController extends Object
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:

  1. Decrypts the envelope when encryptKey is configured
  2. Verifies the X-Lark-Signature header when present
  3. Echoes the URL verification challenge on the verification handshake
  4. Deduplicates by header.event_id
  5. Applies the bot-loop guard and dispatches to the channel
  • Constructor Details

    • FeishuCallbackController

      public FeishuCallbackController()
  • Method Details

    • callback

      @PostMapping(value="/{channelId}/callback", consumes="application/json", produces="application/json") public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<String>> callback(@PathVariable String channelId, @RequestHeader(value="X-Lark-Signature",required=false) String signature, @RequestHeader(value="X-Lark-Request-Timestamp",required=false) String timestamp, @RequestHeader(value="X-Lark-Request-Nonce",required=false) String nonce, @RequestBody String rawBody)