WeCom Bot - App Connection

  • Edit Times:5
  • Recent Updates:Chauvet-赵薇 on 2026-10-26
  • Description

    This document describes the preparatory operation process for connecting the Dora platform to a WeCom bot. Complete the steps in order. Otherwise, the system will be unable to access WeCom usernames/IDs.

    Prerequisite

    (1) You must have the permission on the WeCom admin console.

    (2) You have configured a domain name for the Dora service.

    (3) You have obtained the IP address of the server where the FineAI component is located (for WeCom's trusted IP address configuration).

    Procedure

    Creating a Self-Built WeCom App

    Creating an App

    Log in to the WeCom Admin Console as the WeCom administrator, choose App Management > Apps > Self-built, and create an app.

    iconNote:

    Create a dedicated app specifically for the Dora platform. Apps already bound to other platforms, such as FineBI, cannot be reused.

    Setting App Information and Visibility

    Set the app logo, app name, and visibility range. The visibility range must include all users/departments using the bot within the enterprise. You are advised to select all members.

    iconNote:
    WeCom users who are not included in the app's visibility range cannot be matched to the corresponding Dora users through user mapping, nor can they use the bot normally.

    Configuring API Reception Information

    Entering the API Reception Configuration Page

    After creating the self-built app, you will automatically be redirected to the app configuration details page. Under Features > Receive messages, click Set to receive messages via API to enter the message reception server configuration page.

    Message Reception Server Configuration

    (1) Refer to the following rules to obtain the URL:

    https://{Dora service domain name}/{FineBI service suffix}/external/api/im/config/wecom/callback

    Examle: https://www.example.com/decision/external/api/im/config/wecom/callback

    (2) Click Get randomly for the system to automatically generate the Token and EncodingAESKey.

    iconNote:
    After the Token and EncodingAESKey are generated, do not click Save yet. You must first enter these two items on the Dora management backend.

    Configuring App Connection on the Dora Management Backend

    Log in to the Dora management backend as the super administrator, choose User Management > IM User Mapping, click the Configure button next to App Connection, enter the Token and EncodingAESKey obtained in the previous step into the pop-up box, and click Next to complete the connection.

    Saving API Reception

    Return to the WeCom Admin Console and save the API reception configuration set in section "Configuring API Reception Information."

    Configuring Webpage Authorization and JS-SDK

    (1) Under Developer API > Web Authorization and JS-SDK, click Set trusted domain name and add the Dora access domain name configured by your enterprise to Trusted domain names that can call JS-SDK to redirect to Mini Program.

    (2) Click Domain name to be verified to download the verification file. The verification file name is usually WW_verify_xxx.txt.

    (3) Add the verification file to the root directory of your enterprise's Dora domain name to ensure that https://<domain>/WW_verify_xxx.txt can be accessed directly. The following table lists the domain name storage path.

    Project Access Method

    Verification File Location

    Non-short domain name

    (The access URL contains webroot, for example, http://domain/webroot/decision.)

    Host-mounted path:

    /mounted   directory/fanruanxxx/bi7-web/ROOT

    Short domain name or empty access path

    (webroot is   omitted from the access URL.)

    You need to manually copy and paste the verification file to the webroot root directory in the bi-web container.

    Operation example:

    docker cp WW_verify_xxx.txt <bi-web container   name>:/usr/local/tomcat/webapps/webroot/

    Configuring Enterprise's Trusted IP Addresses

    Under Developer API > Company's Trusted IP, click Settings, add the egress IP address of the Dora service in the pop-up box, and click OK to complete the whitelist configuration.

    Enterprise trusted IP addresses must comply with the following restrictions:

    • The domain name must have an ICP filing, and the filing entity must be consistent with or related to the WeCom enterprise entity.

    • Newly created apps do not support IP addresses, addresses with port numbers, or intranet domain names.

    • The domain name entered must be the one in the address bar when users actually open Dora on a mobile device. If users access Dora via a gateway or reverse proxy, enter the external domain name of the gateway.

    Configuring CorpSecret and CorpId

    Obtaining WeCom CorpSecret and CorpId

    (1) In the Self-built area, click Dora to enter the configuration details page, and click View next to Secret to obtain the CorpSecret.

    (2) Choose My Company > Company Information, scroll down the page, and obtain the company ID.

    Adding CorpSecret and CorpId on the Dora Management Backend

    Log in to the Dora management backend as the super administrator, choose User Management > IM User Mapping, continue to the next step in the section "Configuring App Connection on the Dora Management Backend", enter the CorpSecret and CorpId just obtained in the pop-up box, and click Test Connection and Save. When the page displays "Configured", the configuration is successful.

    Confirming Network Connectivity

    After completing all the above steps, you are advised to test and ensure that the Dora server can normally access qyapi.weixin.qq.com.

    If a proxy or privatized address is configured in the backend, the Dora server must be able to access the corresponding proxy or privatized address.



    Attachment List


    Theme: Open Integration
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read