Feishu Bot - App Connection

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

    Function Description

    This document will describe in detail how to create a Feishu bot app and connect it to the Dora platform for user mappings.

    Version

    Dora Version

    Functional Change

    V0.7

    /

    V1.4

    Supported card interaction.

    Whitelisting

    In an intranet environment, whitelist the following domain names in advance on the server where the FineBI service and Data Agent service are deployed to ensure normal service access:

    • open.feishu.cn

    • open.larksuite.com

    Feishu Bot Creation

    Creating a Custom Feishu App

    Access Feishu Developer Console and create a custom enterprise app.

    Adding Capabilities to the App

    After app creation, go to the app capability configuration page, choose Add Features > By Feature, and add the Bot and Web app capabilities.

    Configuring Bot Permission Management

    For the bot to have the basic functions of sending and receiving messages, choose Development Configuration > Permissions & Scopes and configure related permissions either by adding them in batches or manually adding them one by one. The following describes how to add them.

    (1) Adding Them in Batches

    Import permissions in batches using the following code:

    {
      "scopes": {
        "tenant": [
          "cardkit:card:write",
          "contact:contact.base:readonly",
          "contact:user.base:readonly",
          "contact:user.department:readonly",
          "contact:user.employee_id:readonly",
          "im:app_feed_card:write",
          "im:message",
          "im:message.group_at_msg:readonly",
          "im:message.p2p_msg:readonly",
          "im:message:readonly",
          "im:message:send_as_bot",
          "im:message:send_sys_msg",
          "im:message:update",
          "im:resource",
          "cardkit:card:write"
        ],
        "user": []
      }
    }


    (2) Manually Adding Them

    Configure the following permissions for the bot:

    • Get basic information in contacts

    • Obtain user's organization information

    • Obtain user's basic information

    • Obtain user ID

    • Create, update, and delete app feed card

    • Get direct messages sent to bot

    • Read direct messages and group chat messages

    • Send messages as an app

    • Send specified template system message

    • Update message

    • Read and send direct messages and group chat messages

    • Receive users' mentions

    • Create and update card

    • Read and upload images or other files

    Configuring Bot Events and Callbacks

    Event Configuration

    Choose Events and Callbacks > Event Configuration and add the Message received event for the bot.

    Callback Configuration

    Choose Events and Callbacks > Callback Configuration and add Card callback communication for the bot.

    iconNote:
    Before the bot app is bound to the agent, connection verification will fail, which is normal. No verification is required at this stage. Complete and save the callback configuration, and perform verification after the agent is bound.


    Configuring the Webpage Application Capability

    Add the PC and mobile access URLs of your enterprise's deployed Dora to Desktop homepage and Mobile homepage, respectively.

    Configuring Trusted H5 Domain Names

    Choose Security Settings > H5 trusted domains and add the egress IP address of the Dora service.

    iconNote:
    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.

    Publishing the App

    After completing the above configuration, click Create Version, go to Version Management & Release, and save and publish the bot app of the current version.

    iconNote:

    If the app is not created by a Feishu administrator, you must apply to the Feishu administrator for online publication.

    Obtaining the App ID and App Secret

    After the app is successfully published, choose Basic Info > Credentials & Basic Info and copy the app ID and app secret.


    Feishu User Mapping

    Log in to the Dora platform as the super administrator, choose User Management > IM User Mapping, and enter the app ID and app secret obtained from the above operations into the App Connection area for the Feishu bot app to complete the connection and user mapping between Feishu and the Dora platform.

    Network Connectivity Confirmation

    After completing all the above steps, you are advised to test and confirm network connectivity:

    (1) The Dora server can access open.feishu.cn normally. 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.

    (2) The mobile device must be able to access the public CDN (lf1-cdn-tos.bytegoofy.com) of the Feishu JSSDK. Dora will load this capability when users tap the sharing button. Currently, Feishu sharing is not available in environments with strictly restricted networks or private Feishu deployments.

    (3) The card's summary and image are generated by the Feishu server fetching the sharing link. If the sharing link is an intranet address, the shared card will display only the title.


    Attachment List


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