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
- Complete the Configure an Enterprise bot process (select Stream mode as the message receiving mode).
- After the bot is created, add the bot to a group.
-
Complete the API permission request for the OpenAPI. You need to request the
Permission to send messages with an internal Enterprise bot. -
Prepare the development environment:
Quick start
-
Download the sample demo:
-
Start the sample demo:
Procedure
The following is a Java example. For the Python example, download the demo above.
-
Add the dependencies to the
pom.xmlfile of your project. -
Create the main method and start it.
- @ mention the bot in the group and send a message. The bot replies with the message content.
Related documents
- Bot receives messages
- Server-side Stream mode
- Bot sends group chat messages
- Message types supported by an Enterprise bot