AS AgentScopeAPI 手册 / API Reference

WeComCallbackController

@RestController @RequestMapping("/api/channels/wecom") public class WeComCallbackController
源码Source io/agentscope/extensions/channel/wecom/WeComCallbackController.java:49–213

WeCom 回调控制器,把智能体接入外部消息渠道与企业平台。位于 io.agentscope.extensions.channel.wecom 包。核心成员包括 verify、dispatch、WeComCallbackController。

Handles the WeCom callback URL handshake (GET) and inbound encrypted message delivery (POST).

Each WeComChannel registers itself with the controller at start-up; the controller dispatches incoming requests by channelId extracted from the URL path. This avoids Spring-side dynamic mapping registration and keeps wiring trivially testable.

构造器摘要Constructor Summary

构造器Constructor说明Description
public WeComCallbackController()
初始化 `WeComCallbackController` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public ResponseEntity<String> verify(String channelId, String signature, String timestamp, String nonce, String echostr)
执行 `verify` 方法。
URL verification handshake.
public Mono<ResponseEntity<String>> dispatch(String channelId, String signature, String timestamp, String nonce, String body)
执行 `dispatch` 方法。
Inbound encrypted message.

构造器详情Constructor Detail

WeComCallbackController

public WeComCallbackController()

初始化 WeComCallbackController 实例。

Creates a new instance.

源码Source io/agentscope/extensions/channel/wecom/WeComCallbackController.java:58–60

方法详情Method Detail

verify

public ResponseEntity<String> verify(String channelId, String signature, String timestamp, String nonce, String echostr)

执行 verify 方法。

URL verification handshake.

参数Parameters
名称Name类型Type说明Description
channelIdString渠道标识(类型 `String`)。The channel id.
signatureStringsignature(类型 `String`)。The signature.
timestampString时间戳(类型 `String`)。The timestamp.
nonceStringnonce(类型 `String`)。The nonce.
echostrStringechostr(类型 `String`)。The echostr.
返回Returns ResponseEntity<String>
返回ResponseEntity。Returns response entity.
源码Source io/agentscope/extensions/channel/wecom/WeComCallbackController.java:72–99

dispatch

public Mono<ResponseEntity<String>> dispatch(String channelId, String signature, String timestamp, String nonce, String body)

执行 dispatch 方法。

Inbound encrypted message.

参数Parameters
名称Name类型Type说明Description
channelIdString渠道标识(类型 `String`)。The channel id.
signatureStringsignature(类型 `String`)。The signature.
timestampString时间戳(类型 `String`)。The timestamp.
nonceStringnonce(类型 `String`)。The nonce.
bodyString正文(类型 `String`)。The body.
返回Returns Mono<ResponseEntity<String>>
返回Mono>。Returns mono.
源码Source io/agentscope/extensions/channel/wecom/WeComCallbackController.java:107–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.