Skip to main content
To send messages to a group via an Enterprise bot, follow the steps in this document.

Clarify your requirements

Before development, note that this document helps you set up the following scenario in Stream mode: when you @ mention an Enterprise bot in a group, the bot replies to your message by calling the Bot sends group chat messages API. You can run the sample demo provided in “Quick start” to get a hands-on experience of using an Enterprise bot.

Prerequisites

  1. Complete the Configure an Enterprise bot process (select Stream mode as the message receiving mode).
  2. After the bot is created, add the bot to a group.
  3. Complete the API permission request for the OpenAPI. You need to request the Permission to send messages with an internal Enterprise bot.
  4. Prepare the development environment:

Quick start

  1. Download the sample demo:
  2. Start the sample demo:

Procedure

The following is a Java example. For the Python example, download the demo above.
  1. Add the dependencies to the pom.xml file of your project.
  2. Create the main method and start it.
  3. @ mention the bot in the group and send a message. The bot replies with the message content.​