Skip to content

DingTalk Bot Setup Guide

VeryLiu-lab edited this page Feb 14, 2026 · 1 revision

๐Ÿค– DingTalk Bot Setup Guide

This guide covers how to create and configure a DingTalk bot to connect with AionUi, enabling AI assistant interactions through DingTalk.

English | ็ฎ€ไฝ“ไธญๆ–‡

๐ŸŽฏ Overview

AionUi supports DingTalk bot integration, allowing you to chat with your AI assistant directly through DingTalk. This guide will walk you through:

  1. Creating a bot application on DingTalk Open Platform
  2. Configuring credentials in AionUi
  3. Authorizing users and starting conversations

๐Ÿ“‹ Prerequisites

  • A DingTalk account with developer access
  • AionUi application installed
  • Basic understanding of bot applications

๐Ÿš€ Step-by-Step Setup

Step 1: Create a Bot Application on DingTalk Open Platform

  1. Visit DingTalk Open Platform

  2. Create Application

    • After logging in, navigate to Application Development (ๅบ”็”จๅผ€ๅ‘) โ†’ Enterprise Internal Development (ไผไธšๅ†…้ƒจๅผ€ๅ‘)
    • Click "Create Application" (ๅˆ›ๅปบๅบ”็”จ)
    • Select Robot (ๆœบๅ™จไบบ) as the application type

    Create Application - Select Robot Type

  3. Get Your Credentials

    • In the application details page, find the Development Information (ๅผ€ๅ‘ไฟกๆฏ) or Credentials (ๅ‡ญ่ฏ) section
    • Copy your AppKey (this is your Client ID)
    • Copy your AppSecret (this is your Client Secret)
    • โš ๏ธ Important: Keep these credentials secure and never share them publicly
  4. Configure Message Reception Mode

    • In the application configuration, find "Message Reception Mode" (ๆถˆๆฏๆŽฅๆ”ถๆจกๅผ) or "Connection Mode" (่ฟžๆŽฅๆ–นๅผ)
    • Select Stream Mode (ๆตๅผ่ฟžๆŽฅ)
    • This enables real-time message streaming and supports AI Card streaming responses

    Configure Stream Mode

  5. Publish DingTalk Bot

    • After completing the configuration, click the Publish (ๅ‘ๅธƒ) button to publish the bot

    Publish DingTalk Bot


Step 2: Enable Enterprise Application Permissions

โš ๏ธ Note: Non-admin users need admin approval to enable permissions

In the application details page, go to "Permission Management" (ๆƒ้™็ฎก็†) or "API Permissions" (ๆŽฅๅฃๆƒ้™) section, and enable the following permissions one by one:

  • Card.Streaming.Write - AI Card streaming write permission
  • Card.Instance.Write - AI Card instance write permission
  • qyapi_robot_sendmsg - Robot send message permission

These permissions are required for the bot to function properly.

Permission Configuration


Step 3: Publish Enterprise Application

  1. Configure Visibility Scope

    • In the application details page, find "Visibility Scope" (ๅฏ่ง่Œƒๅ›ด) or "Usage Scope" (ไฝฟ็”จ่Œƒๅ›ด) settings
    • Set visibility to "Only Me" (ไป…่‡ชๅทฑ) for testing, or select users/departments who need access
  2. Enable Robot

    • Ensure the robot feature is enabled
    • Check basic information like robot name and avatar
  3. Publish Application

    • Click the Publish (ๅ‘ๅธƒ) button
    • Confirm the publishing information is correct
    • Wait for the publishing to complete

    Publish Enterprise Application Steps Publish Enterprise Application Steps Publish Enterprise Application Steps Publish Enterprise Application Steps

๐Ÿ’ก Tip: After publishing, the bot can be searched and used by users. For testing purposes, you can set it to "Only Me" first.


Step 4: Configure AionUi

  1. Open AionUi Settings

    • Launch AionUi application
    • Go to Settings (่ฎพ็ฝฎ)
    • Navigate to WebUI (Channel) section
    • Find the "DingTalk" channel card
    • Expand the DingTalk configuration

    AionUi DingTalk Configuration Interface

  2. Enter Credentials

    • In the DingTalk configuration form:
      • Client ID: Paste the AppKey you obtained in Step 1
      • Client Secret: Paste the AppSecret you obtained in Step 1
    • Click "Test & Connect" to verify the connection

    Enter DingTalk Credentials

  3. Configure Agent and Model

    • Select the Agent you want to use for DingTalk conversations
    • Choose the Model for the selected agent
    • These settings determine which AI assistant will respond to DingTalk messages

    Configure Agent and Model


Step 5: Authorize Users

After successfully connecting, you need to authorize users who can interact with the bot:

  1. Find Your Bot in DingTalk

    • Open DingTalk application
    • Search for your bot by name
    • Start a conversation with the bot
  2. Send a Test Message

    • Send any message to the bot (e.g., "Hello")
    • This will trigger a pairing request

    Send Message in DingTalk

  3. Approve the Pairing Request

    • In AionUi, go back to Settings โ†’ Channels โ†’ DingTalk
    • You should see a "Pending Pairings" section
    • Click "Approve" to authorize the user
    • The user will now be able to chat with the AI assistant through DingTalk

    Approve Pairing Request

  4. Start Chatting

    • Once approved, users can send messages to the bot
    • The AI assistant will respond in real-time using DingTalk's AI Card streaming feature

    Start Chatting with AI Assistant


๐Ÿ”ง Troubleshooting

Connection Issues

Problem: Cannot connect to DingTalk API

  • Solution:
    • Verify your Client ID and Client Secret are correct
    • Check your internet connection
    • Ensure the bot application is properly configured on DingTalk Open Platform

Authorization Issues

Problem: Users cannot send messages to the bot

  • Solution:
    • Make sure the user has been approved in AionUi settings
    • Verify the bot is enabled in AionUi
    • Check that the bot application is published/activated on DingTalk Open Platform

Message Not Received

Problem: Bot doesn't respond to messages

  • Solution:
    • Check the connection status in AionUi settings
    • Verify the agent and model are properly configured
    • Ensure the bot has the necessary permissions on DingTalk Open Platform (especially the three permissions mentioned in Step 2)
    • Confirm the bot application has been successfully published (Step 3)

๐Ÿ“š Additional Resources


๐Ÿ”— Quick Links


Need help? Check the FAQ or open an issue on GitHub.

๐Ÿš€ AionUi Wiki

Welcome to the comprehensive AionUi documentation! Find everything you need to configure, use, and master AionUi.


๐Ÿ  Home


๐Ÿ“š Configuration & Usage Guides

Overview

Getting Started

Core Configuration

Support


๐ŸŽฏ Application Use Cases

Overview

Featured Use Cases


๐ŸŒ Language Switch


๐Ÿ”— Quick Links


๐Ÿค Community

Clone this wiki locally