Define your requirements
Before you start development, review the following overview. This document helps you, in Stream mode, send a message to the bot during a direct chat. The bot then replies to your message by calling the Send one-on-one chat messages between users and bots in batches API. Try running the sample demo provided in “Quick start” to get a hands-on experience with the enterprise bot.Prerequisites
- Complete the Configure the enterprise bot process (select Stream mode for the message receiving mode).
-
Complete the API permission application for the OpenAPI endpoint. Request the
Permission to send messages from an internal botscope. -
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 from the section above.
-
Add the dependencies to the project’s
pom.xmlfile. -
Create the main method and start it.
- Send a message to the bot in a direct chat. You can then see the message sent by the bot.
Related documents
- Bot receives messages
- Server-side Stream mode
- Message types supported by enterprise bots
- Send one-on-one chat messages between users and bots in batches