2.0 KiB
2.0 KiB
| summary | read_when | |
|---|---|---|
| DingTalk bot support status, capabilities, and configuration |
|
DingTalk
Status: beta; inbound via WebSocket using dingtalk-stream SDK.
Quick setup
- Create an enterprise internal robot in DingTalk Open Platform.
- Enable "Stream Mode" in robot settings.
- Configure
channels.dingtalk.clientIdandchannels.dingtalk.clientSecret. - Start the gateway.
Minimal config:
{
channels: {
dingtalk: {
enabled: true,
clientId: "YOUR_APP_KEY",
clientSecret: "YOUR_APP_SECRET"
}
}
}
Multi-account example:
{
channels: {
dingtalk: {
accounts: {
work: { clientId: "APP_KEY", clientSecret: "APP_SECRET" },
personal: { clientId: "APP_KEY", clientSecret: "APP_SECRET" }
}
}
}
}
How it works
- Messages are received over the DingTalk WebSocket stream (no public URL needed).
- Replies are sent back via the session webhook provided in each message.
- DMs use pairing by default (
channels.dingtalk.dm.policy). - Group chats can be restricted with
channels.dingtalk.groupPolicyandchannels.dingtalk.groups.
Target formats
dingtalk:<conversation_id>for group chats.dingtalk:<user_id>for direct messages.
Configuration reference (DingTalk)
channels.dingtalk.clientId: DingTalk AppKey (Client ID).channels.dingtalk.clientSecret: DingTalk AppSecret (Client Secret).channels.dingtalk.dm.policy: DM policy (pairing,allowlist,open,disabled).channels.dingtalk.dm.allowFrom: allowlist for DMs when policy isallowlistoropen.channels.dingtalk.groupPolicy:open,allowlist, ordisabled.channels.dingtalk.groups: per-chat overrides keyed byconversation_id(supportsrequireMention,tools,users).channels.dingtalk.requireMention: whether the bot must be @mentioned in groups (default:true).channels.dingtalk.textChunkLimit: max characters per message chunk (default:4000).