Skip to content
OneviumDocs
On this page

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, 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 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 and official Stream SDK instructions. 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:

PurposePermission name in the platform docsOnevium 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 textAI卡片流式更新权限 (Card.Streaming.Write)/v1.0/card/streaming

See the official group message API, card creation API, card update API, and streaming-card guide. 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.

FieldExample
Bot NameProject helper
DescriptionAnswer demo-project questions
ModelA tested provider/model
Working DirectoryYour demo project folder
Conversation ModeEach person gets their own conversation
Chat ScopeGroups only for the first run
Auto-approve ActionsAsk before every action
System PromptThe 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 uses an embedded AI-card template. You do not need to create a template or paste its ID into Onevium; the bot form has no template-ID field.

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 built-in selection. File, member, and group-history access are separate capabilities from a successful text reply.

Troubleshoot by symptom#

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

Next steps#

Use channel settings for context sharing and automations for delivery from a recurring task. Compare Feishu when setting up another team platform.