Develop Stream Mode (Recommended)
- Java
- Golang
1
Prerequisites
- A runtime environment with public network access.
- JDK 1.8 or later.
2
Install the 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 on Maven Central.3
Server-Side Integration
Sample Code
The following examples use a Bot callback and an interactive Card callback for reference.Bot CallbackCard CallbackFor details, see Interactive Card - Event Callback.
Other Language Support
Java SDK Quick-Start Project
Golang SDK and Sample Code
Python SDK and Sample Code
Node.js SDK and Sample Code
Error Codes
When receiving an event returns the following error code, resolve it according to the solution.FAQ
Can I start multiple event listeners in one application?
Can I start multiple event listeners in one application?
Yes. You can start multiple event listening services and configure multiple Stream clients as needed.
- Internal app: An enterprise only needs to configure one Stream client.
- Third-party enterprise app: Listen to that third-party enterprise app only to obtain the event subscription content of the currently authorized enterprise.
Develop HTTP Mode
1
Prerequisites
- Understand the Configure HTTP Push (Not Recommended) process.
- Development environment: Maven 3, JDK 1.8 or later.
2
Integrate the Event Message Encryption/Decryption Class
3
Write the HTTP Push Server Code
Receive event messagesRespond to event messages
When you receive a POST verification request from the Open Platform, you must decrypt it and respond within 2500 ms.
Develop SyncHTTP Mode
1
Prerequisites
- Understand the Configure SyncHTTP Push (Not Recommended) process.
- Development environment: Maven 3, JDK 1.8 or later.
2
Integrate the Event Message Encryption/Decryption Class
3
Write the SyncHTTP Push Server Code
Receive event messagesRespond to event messages
When you receive a POST verification request from the Open Platform, you must decrypt it and respond within 2500 ms.