Skip to main content
To develop a Bot that receives messages, follow the steps in this document to complete the server-side development for message reception.

Background

Bots can receive messages in two modes: Stream mode and HTTP mode. This document describes how to receive messages in both modes.

Prerequisites

  1. Complete the Create an app process.
  2. Complete the process of adding app capabilities.

Procedure

For more languages, refer to the Server-side Stream mode documentation.
  1. Prepare the Java development environment:
  • Runtime: JDK 1.8 or later
  • Install the Java SDK: Add the dependency to your project’s pom.xml file or download the corresponding JAR package. You can view and download the latest SDK version here.
  1. Server-side integration example:
  2. After the development is complete, add the Bot to a group. When you send “Hello” by @ the Bot, the server receives a message in the following format:

HTTP mode

  1. Prepare the Java development environment:
    • Runtime: JDK 1.7 or later
  2. Server-side integration example:
  3. After the development is complete, add the Bot to a group. When you send “Hello” by @ the Bot, the server receives a message in the following format:

Next steps

After completing the development of message reception by the Bot, you can reply to the received messages or send messages. Continue with the following: