Skip to main content

DingTalk

The DingTalk Channel uses a Stream connection for receiving bot events and sending replies. The resident Gateway maintains the connection, so the normal setup does not require a public inbound webhook.

What You Need

  • a DingTalk application with bot capability;
  • Stream bot message subscription enabled;
  • the Client ID and Client Secret; and
  • optional Bot User ID, Bot Staff ID, or Robot Code when required by the app identity.

Consult the current DingTalk Stream SDK documentation while configuring the application.

Connect in Dashboard

  1. Open Dashboard → ChannelAdd account.
  2. Choose DingTalk and Stream.
  3. Enter the Client ID and Client Secret.
  4. Add optional bot identity fields only when they match the configured application.
  5. Review direct-message and group policies, then save.
  6. Confirm the Stream bot message subscription in DingTalk.

The default account ID is work.

Access Policies

Direct messages default to pairing; supported values are pairing, open, allowlist, and disabled. Group messages default to mention; they can also be open, allowlist, or disabled.

anyy channel pairing list
anyy channel pairing approve --request REQUEST_ID

For groups, test with an explicit bot mention first.

Verify the Connection

anyy channel doctor dingtalk
anyy channel reload

After reload, send a direct message and a mentioned group message. Verify each policy path independently.

Keep the Gateway resident

Stream delivery depends on the live Gateway connection. If messages stop after a restart or network change, check Gateway status before changing DingTalk app settings.

Troubleshooting

ProblemCheck
Stream never connectsClient ID/Secret, outbound network access, and Stream subscription
Direct message ignoredDM policy and pairing/allowlist
Group message ignoredGroup policy and explicit mention
Receive works but reply failsBot identity fields and DingTalk application permissions
Connection drops repeatedlyGateway health, network stability, then Channel reload