AS AgentScopeAPI 手册 / API Reference

WeComChannelProperties

public record WeComChannelProperties( String corpId, int agentId, String secret, String token, String encodingAesKey, String callbackPath, String apiBase)
源码Source io/agentscope/extensions/channel/wecom/WeComChannelProperties.java:38–108

承载 WeCom 渠道属性数据的记录类型。位于 io.agentscope.extensions.channel.wecom 包。核心成员包括 corpId、agentId、secret、token、encodingAesKey、callbackPath。

Provider-specific configuration for a single WeCom (企业微信) channel instance, sourced from the properties block of channels.<id> in agentscope.json.

The environment-variable-resolved values (e.g. ${WECOM_CORP_ID}) are expected to be substituted by the caller before construction.

记录组件摘要Record Component Summary

组件Component类型Type说明Description
corpIdString
执行 `corpId` 方法。
WeCom corporation id (cn: 企业 ID)
agentIdint
执行智能体标识相关操作。
self-built application id (numeric, but kept as int for the send API)
secretString
执行密钥相关操作。
application secret
tokenString
执行令牌相关操作。
callback token (configured in the WeCom admin console)
encodingAesKeyString
执行 `encodingAesKey` 方法。
43-character base64 (no padding) AES key for callback encryption
callbackPathString
执行回调路径相关操作。
the HTTP path Spring exposes the callback under; defaults to `/api/channels/wecom/{channelId}/callback`
apiBaseString
执行API 基类相关操作。
override for the WeCom API base URL; default `https://qyapi.weixin.qq.com`

构造器摘要Constructor Summary

构造器Constructor说明Description
public WeComChannelProperties(String corpId, int agentId, String secret, String token, String encodingAesKey, String callbackPath, String apiBase)
初始化 `WeComChannelProperties` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public static WeComChannelProperties from(String channelId, Map<String, Object> props)
static
创建并返回实例。
Reads a `WeComChannelProperties` out of an arbitrary properties map.

记录组件详情Record Component Detail

corpId

String corpId

执行 corpId 方法。

WeCom corporation id (cn: 企业 ID)

源码Source io/agentscope/extensions/channel/wecom/WeComChannelProperties.java:38–108

agentId

int agentId

执行智能体标识相关操作。

self-built application id (numeric, but kept as int for the send API)

源码Source io/agentscope/extensions/channel/wecom/WeComChannelProperties.java:38–108

secret

String secret

执行密钥相关操作。

application secret

源码Source io/agentscope/extensions/channel/wecom/WeComChannelProperties.java:38–108

token

String token

执行令牌相关操作。

callback token (configured in the WeCom admin console)

源码Source io/agentscope/extensions/channel/wecom/WeComChannelProperties.java:38–108

encodingAesKey

String encodingAesKey

执行 encodingAesKey 方法。

43-character base64 (no padding) AES key for callback encryption

源码Source io/agentscope/extensions/channel/wecom/WeComChannelProperties.java:38–108

callbackPath

String callbackPath

执行回调路径相关操作。

the HTTP path Spring exposes the callback under; defaults to /api/channels/wecom/{channelId}/callback

源码Source io/agentscope/extensions/channel/wecom/WeComChannelProperties.java:38–108

apiBase

String apiBase

执行API 基类相关操作。

override for the WeCom API base URL; default https://qyapi.weixin.qq.com

源码Source io/agentscope/extensions/channel/wecom/WeComChannelProperties.java:38–108

构造器详情Constructor Detail

WeComChannelProperties

public WeComChannelProperties(String corpId, int agentId, String secret, String token, String encodingAesKey, String callbackPath, String apiBase)

初始化 WeComChannelProperties 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
corpIdStringcorp 标识(类型 `String`)。The corp id.
agentIdint智能体标识(类型 `int`)。The agent id.
secretString密钥(类型 `String`)。The secret.
tokenString令牌(类型 `String`)。The token.
encodingAesKeyStringencoding Aes 键(类型 `String`)。The encoding aes key.
callbackPathString回调路径(类型 `String`)。The callback path.
apiBaseStringAPI 基类(类型 `String`)。The api base.
源码Source io/agentscope/extensions/channel/wecom/WeComChannelProperties.java:47–66

方法详情Method Detail

from

public static WeComChannelProperties from(String channelId, Map<String, Object> props)
static

创建并返回实例。

Reads a WeComChannelProperties out of an arbitrary properties map.

参数Parameters
名称Name类型Type说明Description
channelIdString渠道标识(类型 `String`)。The channel id.
propsMap<String, Object>props(类型 `Map`)。The props.
返回Returns WeComChannelProperties
返回WeComChannelProperties。Returns wecom channel properties.
源码Source io/agentscope/extensions/channel/wecom/WeComChannelProperties.java:69–81
基于官方固定版本源码静态生成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.