AS AgentScopeAPI 手册 / API Reference

DingTalkChannelProperties

public record DingTalkChannelProperties( String appKey, String appSecret, String robotCode, String mode, String aesKey, String apiBase, String oapiBase, String streamRegisterUrl)
源码Source io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:41–136

承载 DingTalk 渠道属性数据的记录类型。位于 io.agentscope.extensions.channel.dingtalk 包。核心成员包括 appKey、appSecret、robotCode、mode、aesKey、apiBase。

Configuration for a single DingTalk (钉钉) channel instance.

Reception mode: #MODE_STREAM (default) receives bot messages over a persistent WebSocket connection; #MODE_HTTP receives them via signed HTTP callbacks delivered to /api/channels/dingtalk/{channelId}/callback, requiring a Spring web application.

记录组件摘要Record Component Summary

组件Component类型Type说明Description
appKeyString
执行应用键相关操作。
enterprise internal app key
appSecretString
执行应用密钥相关操作。
enterprise internal app secret
robotCodeString
执行 `robotCode` 方法。
robot code used as outbound sender id; required for replies
modeString
执行模式相关操作。
reception mode: `stream` (default) or `http`
aesKeyString
执行 `aesKey` 方法。
43-character base64 (no padding) AES key for callback body decryption; only used in `http` mode, and only required when the robot is configured with encryption
apiBaseString
执行API 基类相关操作。
override for the DingTalk OpenAPI base; default `https://api.dingtalk.com`
oapiBaseString
执行 `oapiBase` 方法。
override for the legacy OAPI base used by `gettoken`; default `https://oapi.dingtalk.com`
streamRegisterUrlString
执行注册 URL。
override for the Stream gateway registration endpoint; default `https://api.dingtalk.com/v1.0/gateway/connections/open`

字段摘要Field Summary

字段Field类型Type说明Description
MODE_STREAM
staticfinal
String
模式流字段。
Reception mode value: bot messages arrive over a persistent Stream WebSocket.
MODE_HTTP
staticfinal
String
模式 HTTP字段。
Reception mode value: bot messages arrive as signed HTTP callbacks.
DEFAULT_API_BASE
staticfinal
String
默认 API 基类字段。
The DEFAULT API BASE field.
DEFAULT_OAPI_BASE
staticfinal
String
默认 OAPI 基类字段。
The DEFAULT OAPI BASE field.
DEFAULT_STREAM_REGISTER_URL
staticfinal
String
默认流注册 URL字段。
The DEFAULT STREAM REGISTER URL field.

构造器摘要Constructor Summary

构造器Constructor说明Description
public DingTalkChannelProperties(String appKey, String appSecret, String robotCode, String mode, String aesKey, String apiBase, String oapiBase, String streamRegisterUrl)
初始化 `DingTalkChannelProperties` 实例。
Creates a new instance.
public DingTalkChannelProperties(String appKey, String appSecret, String robotCode, String apiBase, String oapiBase, String streamRegisterUrl)
deprecated
初始化 `DingTalkChannelProperties` 实例。
Convenience constructor matching the pre-callback-mode signature; delegates with ` mode=stream` and no `aesKey`.

方法摘要Method Summary

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

记录组件详情Record Component Detail

appKey

String appKey

执行应用键相关操作。

enterprise internal app key

源码Source io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:41–136

appSecret

String appSecret

执行应用密钥相关操作。

enterprise internal app secret

源码Source io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:41–136

robotCode

String robotCode

执行 robotCode 方法。

robot code used as outbound sender id; required for replies

源码Source io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:41–136

mode

String mode

执行模式相关操作。

reception mode: stream (default) or http

源码Source io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:41–136

aesKey

String aesKey

执行 aesKey 方法。

43-character base64 (no padding) AES key for callback body decryption; only used in http mode, and only required when the robot is configured with encryption

源码Source io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:41–136

apiBase

String apiBase

执行API 基类相关操作。

override for the DingTalk OpenAPI base; default https://api.dingtalk.com

源码Source io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:41–136

oapiBase

String oapiBase

执行 oapiBase 方法。

override for the legacy OAPI base used by gettoken; default https://oapi.dingtalk.com

源码Source io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:41–136

streamRegisterUrl

String streamRegisterUrl

执行注册 URL。

override for the Stream gateway registration endpoint; default https://api.dingtalk.com/v1.0/gateway/connections/open

源码Source io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:41–136

字段详情Field Detail

MODE_STREAM

public static final String MODE_STREAM
staticfinal

模式流字段。声明为 public static final String MODE_STREAM。

Reception mode value: bot messages arrive over a persistent Stream WebSocket.

源码Source io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:52

MODE_HTTP

public static final String MODE_HTTP
staticfinal

模式 HTTP字段。声明为 public static final String MODE_HTTP。

Reception mode value: bot messages arrive as signed HTTP callbacks.

源码Source io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:55

DEFAULT_API_BASE

public static final String DEFAULT_API_BASE
staticfinal

默认 API 基类字段。声明为 public static final String DEFAULT_API_BASE。

The DEFAULT API BASE field.

源码Source io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:57

DEFAULT_OAPI_BASE

public static final String DEFAULT_OAPI_BASE
staticfinal

默认 OAPI 基类字段。声明为 public static final String DEFAULT_OAPI_BASE。

The DEFAULT OAPI BASE field.

源码Source io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:58

DEFAULT_STREAM_REGISTER_URL

public static final String DEFAULT_STREAM_REGISTER_URL
staticfinal

默认流注册 URL字段。声明为 public static final String DEFAULT_STREAM_REGISTER_URL。

The DEFAULT STREAM REGISTER URL field.

源码Source io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:59–60

构造器详情Constructor Detail

DingTalkChannelProperties

public DingTalkChannelProperties(String appKey, String appSecret, String robotCode, String mode, String aesKey, String apiBase, String oapiBase, String streamRegisterUrl)

初始化 DingTalkChannelProperties 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
appKeyString应用键(类型 `String`)。The app key.
appSecretString应用密钥(类型 `String`)。The app secret.
robotCodeStringrobot Code(类型 `String`)。The robot code.
modeString模式(类型 `String`)。The mode.
aesKeyStringaes 键(类型 `String`)。The aes key.
apiBaseStringAPI 基类(类型 `String`)。The api base.
oapiBaseStringoapi 基类(类型 `String`)。The oapi base.
streamRegisterUrlString流注册 URL(类型 `String`)。The stream register url.
源码Source io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:62–97

DingTalkChannelProperties

public DingTalkChannelProperties(String appKey, String appSecret, String robotCode, String apiBase, String oapiBase, String streamRegisterUrl)
deprecated

初始化 DingTalkChannelProperties 实例。

Convenience constructor matching the pre-callback-mode signature; delegates with mode=stream and no aesKey.

已弃用。Deprecated. 已弃用,请改用受支持的替代 API。use the canonical constructor (or `#from`) so the reception mode is explicit
参数Parameters
名称Name类型Type说明Description
appKeyString应用键(类型 `String`)。The app key.
appSecretString应用密钥(类型 `String`)。The app secret.
robotCodeStringrobot Code(类型 `String`)。The robot code.
apiBaseStringAPI 基类(类型 `String`)。The api base.
oapiBaseStringoapi 基类(类型 `String`)。The oapi base.
streamRegisterUrlString流注册 URL(类型 `String`)。The stream register url.
源码Source io/agentscope/extensions/channel/dingtalk/DingTalkChannelProperties.java:106–115

方法详情Method Detail

from

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

创建并返回实例。

Reads a DingTalkChannelProperties out of an arbitrary properties map.

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