Skip to main content
To develop a push service for event subscriptions, you can choose one of three push modes: Stream mode, HTTP mode, or SyncHTTP. Follow the steps in this document to complete the development.
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 Callback
Card 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

If you run into any issues during the process, you can submit feedback and discuss them through Technical Support.

Error Codes

When receiving an event returns the following error code, resolve it according to the solution.

FAQ

Yes. You can start multiple event listening services and configure multiple Stream clients as needed.
  1. Internal app: An enterprise only needs to configure one Stream client.
  2. 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

2

Integrate the Event Message Encryption/Decryption Class

For more languages, see dingtalk-callback-Crypto.
3

Write the HTTP Push Server Code

Receive event messages
Respond to event messages
When you receive a POST verification request from the Open Platform, you must decrypt it and respond within 2500 ms.
Your HTTP push server is now developed. You can follow the Configure HTTP Push (Not Recommended) process to verify that the integration is correct.

Develop SyncHTTP Mode

1

Prerequisites

2

Integrate the Event Message Encryption/Decryption Class

For more languages, see dingtalk-callback-Crypto.
3

Write the SyncHTTP Push Server Code

Receive event messages
Respond to event messages
When you receive a POST verification request from the Open Platform, you must decrypt it and respond within 2500 ms.