> Source: Onevium official documentation
> Article: Connect a DingTalk bot
> Original URL: https://onevium.com/docs/channels/dingtalk
> Language: English
> Updated: 2026-09-09
> Applies to: 1.1.22
> Feature status: Released

---

# Connect a DingTalk bot

Configure a DingTalk Stream bot, connect it in Onevium, and verify actual messages and card results.

## Connect a DingTalk Stream bot

Create an enterprise bot, enter its credentials in Onevium 1.1.22, and verify that group messages reach the project assistant. Use the application's Stream credentials, not a custom group Webhook URL.

## Create and publish the bot

1. Open the [DingTalk developer console](https://open-dev.dingtalk.com/) and create an internal enterprise application.
2. Under **Application Capabilities → Add Capability → Bot**, set the bot name, icon, description, and preview image.
3. Set **Message receiving mode** to **Stream**, then publish/save the bot. A receiving URL is needed for HTTP mode, not this Stream flow.
4. Publish the application and include the test users in its available audience. Add the bot to a test group.
5. Obtain **Client ID / App Key** and **Client Secret / App Secret** from the application credentials.

These steps follow DingTalk's [bot configuration guide](https://open.dingtalk.com/document/orgapp/configure-the-robot-application) and [official Stream SDK instructions](https://github.com/open-dingtalk/dingtalk-stream-sdk-nodejs). Ordinary bot messages use the Stream bot callback; you do not need to invent a separate event-subscription topic in the console.

## Grant the message and card capabilities

In the application's **Permissions** area, search for these exact capability names and complete any required approval:

| Purpose                            | Permission name in the platform docs | Onevium API use                                                          |
| ---------------------------------- | ------------------------------------ | ------------------------------------------------------------------------ |
| Group and direct replies           | 企业内机器人发送消息权限                         | `/v1.0/robot/groupMessages/send` and `/v1.0/robot/oToMessages/batchSend` |
| Create and finalize card instances | 互动卡片实例写权限                            | `/v1.0/card/instances/createAndDeliver` and `/v1.0/card/instances`       |
| Incremental AI-card text           | AI卡片流式更新权限 (`Card.Streaming.Write`)  | `/v1.0/card/streaming`                                                   |

See the official [group message API](https://open.dingtalk.com/document/orgapp/the-robot-sends-a-group-message), [card creation API](https://open.dingtalk.com/document/orgapp/create-and-deliver-cards), [card update API](https://open.dingtalk.com/document/orgapp/interactive-card-update-interface), and [streaming-card guide](https://open.dingtalk.com/document/orgapp/typewriter-effect-streaming-ai-card). These are specific requirements; selecting every permission containing “message” or “card” is unnecessary.

## Register it in Onevium

Open **Channels → New Channel → Single bot → DingTalk**. Enter App Key and App Secret, then click **Register Credentials**. Onevium checks the Stream connection before showing the rest of the form.

| Field                | Example                                 |
| -------------------- | --------------------------------------- |
| Bot Name             | `Project helper`                        |
| Description          | `Answer demo-project questions`         |
| Model                | A tested provider/model                 |
| Working Directory    | Your demo project folder                |
| Conversation Mode    | Each person gets their own conversation |
| Chat Scope           | Groups only for the first run           |
| Auto-approve Actions | Ask before every action                 |
| System Prompt        | The short instruction below             |

```text
Answer questions about the selected demo project.
Use file references when you inspect code or documentation.
For the connection test, remember the test code in this conversation.
Do not edit files merely to answer a question.
```

Save and check the status; start the bot if stopped. If the platform provides a **Test long connection** action, run it while Onevium is connected. The simple form uses App Key as the bot code fallback; it does not expose a separate custom card-template field.

## Verify the round trip

Mention the bot in the test group: “The test code is beta-27.” Then ask for that code in a second mention. Check both readable replies and the corresponding Onevium conversation.

To allow private messages, change **Chat Scope** and set **Direct Message Policy**. **Allowed Users** takes one platform user ID per line, not display names. Existing chats have their own **Chat Settings → Conversation Mode**, so inspect that setting when context appears shared unexpectedly.

## Understand streaming cards

Onevium 1.1.22 uses an embedded AI-card template. You do **not** need to create an arbitrary new template and paste its ID into Onevium; there is no such field in this version.

For a template-related error, retain the platform error and template ID, check the card permissions, and verify whether a readable fallback message arrives. If your organization cannot use the embedded template, report that compatibility issue; creating a differently identified template will not change the version's built-in selection. File, member, and group-history access are separate capabilities from a successful text reply.

## Troubleshoot by symptom

| Symptom                    | Next action                                                                                           |
| -------------------------- | ----------------------------------------------------------------------------------------------------- |
| Registration fails         | Check that App Key and Secret match, the bot is published, and receiving mode is Stream               |
| Connected but no message   | Check application audience, group membership, and an actual @mention                                  |
| Message arrives but stalls | Inspect model errors and pending approvals in the Onevium conversation                                |
| Empty or failed card       | Check card-instance/streaming permissions and the recorded template error; verify final fallback text |

## Next steps

Use [channel settings](https://onevium.com/docs/team-channels) for context sharing and [automations](https://onevium.com/docs/scheduled-runs) for delivery from a recurring task. Compare [Feishu](https://onevium.com/docs/channels/feishu) when setting up another team platform.
