WeComChannelProperties
public record WeComChannelProperties( String corpId, int agentId, String secret, String token, String encodingAesKey, String callbackPath, String apiBase)
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 |
|---|---|---|
corpId | String | 执行 `corpId` 方法。 WeCom corporation id (cn: 企业 ID) |
agentId | int | 执行智能体标识相关操作。 self-built application id (numeric, but kept as int for the send API) |
secret | String | 执行密钥相关操作。 application secret |
token | String | 执行令牌相关操作。 callback token (configured in the WeCom admin console) |
encodingAesKey | String | 执行 `encodingAesKey` 方法。 43-character base64 (no padding) AES key for callback encryption |
callbackPath | String | 执行回调路径相关操作。 the HTTP path Spring exposes the callback under; defaults to
`/api/channels/wecom/{channelId}/callback` |
apiBase | String | 执行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)
io/agentscope/extensions/channel/wecom/WeComChannelProperties.java:38–108agentId
int agentId执行智能体标识相关操作。
self-built application id (numeric, but kept as int for the send API)
io/agentscope/extensions/channel/wecom/WeComChannelProperties.java:38–108secret
String secret执行密钥相关操作。
application secret
io/agentscope/extensions/channel/wecom/WeComChannelProperties.java:38–108token
String token执行令牌相关操作。
callback token (configured in the WeCom admin console)
io/agentscope/extensions/channel/wecom/WeComChannelProperties.java:38–108encodingAesKey
String encodingAesKey执行 encodingAesKey 方法。
43-character base64 (no padding) AES key for callback encryption
io/agentscope/extensions/channel/wecom/WeComChannelProperties.java:38–108callbackPath
String callbackPath执行回调路径相关操作。
the HTTP path Spring exposes the callback under; defaults to
/api/channels/wecom/{channelId}/callback
io/agentscope/extensions/channel/wecom/WeComChannelProperties.java:38–108apiBase
String apiBase执行API 基类相关操作。
override for the WeCom API base URL; default
https://qyapi.weixin.qq.com
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.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
corpId | String | corp 标识(类型 `String`)。The corp id. |
agentId | int | 智能体标识(类型 `int`)。The agent id. |
secret | String | 密钥(类型 `String`)。The secret. |
token | String | 令牌(类型 `String`)。The token. |
encodingAesKey | String | encoding Aes 键(类型 `String`)。The encoding aes key. |
callbackPath | String | 回调路径(类型 `String`)。The callback path. |
apiBase | String | API 基类(类型 `String`)。The api base. |
io/agentscope/extensions/channel/wecom/WeComChannelProperties.java:47–66方法详情Method Detail
from
public static WeComChannelProperties from(String channelId, Map<String, Object> props)
创建并返回实例。
Reads a WeComChannelProperties out of an arbitrary properties map.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
channelId | String | 渠道标识(类型 `String`)。The channel id. |
props | Map<String, Object> | props(类型 `Map`)。The props. |
WeComChannelPropertiesio/agentscope/extensions/channel/wecom/WeComChannelProperties.java:69–81