DingTalk configuration

Updated at:

Overview

This document describes how to create a DingTalk internal application bot, enable app permissions, obtain app credentials, and configure the DingTalk channel in the Quick BI AIPro management center. For the overall procedure for channel integration, see Channel management.

Prerequisites

  • You must have a DingTalk account with administrator permissions for your organization. This account is required to create an app, enable permissions, and publish versions on the DingTalk Open Platform.

Create a DingTalk app

Follow these steps to create an internal application on the DingTalk Open Platform and add bot capabilities to it.

Sign in to the developer console

  1. Go to the DingTalk developer console at https://open.dingtalk.com/ and sign in with an organization administrator account.

    钉钉开发者平台首页,单击开发者后台入口登录

Create the app

  1. In the top navigation bar, click App development and go to the DingTalk Apps page.

    钉钉应用开发页面,顶部应用开发入口

  2. Click Create App.

    钉钉应用列表页的创建应用按钮

  3. In the dialog box, provide the following information.

    Parameter

    Value

    Description

    App name

    A custom name

    You can modify this after creation.

    App description

    A brief description of the app's purpose

    You can modify this after creation.

    App icon

    Upload an icon as needed

    You can modify this after creation.

    创建应用弹窗,填写应用名称、应用描述与应用图标

  4. When finished, click Save.

Add bot capabilities

  1. On the app details page, click Add app capabilities in the left-side navigation pane. On the bot card, click Configure.

    添加应用能力页面中的机器人能力卡片

  2. Enter the bot's basic information: Bot name, Bot introduction, Bot description, and Preview image.

    机器人基本信息表单

  3. For Message receiving mode, select Stream mode. This is the only supported mode and does not require a public callback URL.

    机器人消息接收模式选择 Stream 模式

  4. After entering the information, click Publish and confirm the action.

    机器人信息确认发布弹窗

Configure app permissions

To allow the bot to send and receive messages, you must enable the following permissions.

  1. In the left-side navigation pane of the app details page, click Permission management.

  2. In the search box, search for each permission below and click Enable Now.

    Permission

    Purpose

    Card.Streaming.Write

    Enables streaming cards to display responses progressively.

    Card.Instance.Write

    Enables sending and updating message cards.

    qyapi_robot_sendmsg

    Allows the bot to send messages.

    qyapi_get_microapp_list

    Allows retrieval of the bot's name.

    权限管理页面中搜索并开通权限

Create and publish a version

Changes to bot configurations and permissions take effect only after you publish a version.

  1. In the left-side navigation pane of the app details page, click Version management and release, and then click Create new version.

    版本管理与发布页面中的创建新版本按钮

  2. Enter the version information.

    • App version: You can use the default version number.

    • Version description: Enter any description.

    • Availability scope: We recommend selecting All Employees. By default, the app is visible only to its creator. If you do not change this setting, other members of the organization cannot find the bot.

    版本详情页中的应用可用范围设置

  3. Click Save. After you publish this version, organization members can search for and use the bot in DingTalk.

Get app credentials

  1. In the left-side navigation pane of the app details page, click Credentials and basic information.

    image

  2. Find the following credentials on the page:

    Parameter

    Description

    Client ID (formerly AppKey)

    Required. The credential ID of the DingTalk app.

    Client Secret (formerly AppSecret)

    Required. The secret key paired with the Client ID.

Configure the DingTalk channel

  1. In the Quick BI AIPro management center, click Channel management in the left-side navigation pane. Find the DingTalk channel and click Configure (or Edit configuration if it is already configured) to open the Configure DingTalk channel panel.

    频道管理页面中钉钉渠道的配置入口

  2. In the panel, enter the following information.

    • DingTalk App Key: The app's Client ID (formerly AppKey).

    • DingTalk App Secret: The app's Client Secret (formerly AppSecret).

    • Bot name: The name you entered when creating the bot.

    image

  3. Click Save Configuration. The system tests the connection to the bot. If the connection is successful, the channel status changes to Configured. If it fails, verify the credentials and bot permissions, then try again.

Note
  • The saved secret is not displayed again. You must re-enter it when editing the configuration.

  • Credentials are sensitive information. Do not share them in chats or public channels.

For business users

After the bot is configured, organization members can find and use it in DingTalk. Before using the bot for the first time, each user must bind their IM account in Quick BI AIPro. On the Channel page, click Start Binding to get a one-time pairing code. Then, find the bot in DingTalk and send the pairing code to it. The binding is complete after verification. For detailed instructions on the binding method, see Channel.

Note

If you cannot find the bot in your DingTalk organization, its availability scope may not include your account. Contact your administrator to update the scope.