Configure sync webhooks

Update time: 2023/09/27 08:01:32

The data sync service can sync data such as messages or events over HTTP/HTTPS requests to the specified server in real time. Before you use the data sync service, you must activate the data sync service in the CommsEase console.


  • Instant Messaging is activated.

  • The URL of the server that can receive the messages is configured.

    To test the validity of the server address, we recommend that you verify the address with the following commands before you configure the data sync service.

bashcurl -H 'User-Agent: Apache-HttpClient/4.5.9 (Java/1.8.0_151)' -H 'appkey: 0eb***********************' -H 'CurTime: 1608110108512' -H 'MD5:99914b932bd37a5**********' -H 'CheckSum: ea9e0af4****************' -X POST -d '{}' -i ${YourServerAddress}
  • The data sync can be implemented on the local server.

    For more information about the procedure and considerations, see data sync service overview.

Background information

The data sync service is a message sync service provided by CommsEase. The service delivers the messages or events supported by IM. The messages are sent over HTTP/HTTPS requests to the preset server in real time. You can specify a dedicated server or a third-party server for the service. The service enables you to perform analytics for online users and handle special events.


  1. Log in to the CommsEase console.

  2. In the left-side navigation pane, find the application for which you want to activate the data sync service, and click the application name.

  3. Click data sync Configuration.

  4. To specify URLs for data sync, you can select all types of messages for the same URL. You can also configure custom settings by specifying an environment name (env).

    • Enter the data sync address and click OK.
    • Click Add in the Custom data sync configuration and enter an environment name and the corresponding URL.

    After you complete configuring the address, the YunXin server automatically verifies the address by sending a POST request. The request Header contains authentication-related parameters. The request body is in JSON format. The request body is empty when the request is sent for verification. If the 200 HTTP status code is returned within 5 seconds, the verification is successful.

    • The data sync address supports HTTP and HTTPS. To use an address starting with HTTPS, make sure the validity of the HTTPS certificate, and the configured address start with http:// or https://. You can specify an IP address or a domain name.
    • For some types of data sync (such as sending messages using server APIs or calling methods in the SDK), you can set environment variables in the parameters of the method or API, and the CommsEase server will sync messages based on the specified environment.
    • If the console prompts that the verification failed, make sure that the data sync address is valid and the local configuration is correct. You can use tools such as Postman for testing.
    • If you enable the data sync for IM. RTC, and Interactive Live Streaming, and use the same address, the type field in the header of an HTTP request sent by the CommsEase server is required. Otherwise, verifying the address may fail.
  5. For the data sync types, select the events for which you want to send messages.

    Some services require additional permissions. You can contact the account manager to activate the required services. For detailed information, see the description of the message types.

  6. Click OK.


  • If you have enabled the data sync service for IM, Audio & Video Call, and Interactive Live Streaming, and use the same URL, the type field in the header of an HTTP request sent by the CommsEase server is required. Otherwise, verifying the address may fail.
  • The timeout period for data sync is 5 seconds. If the 200 or 500 status code is received from the app server within 5 seconds, the data sync is successful. Otherwise, the data sync fails. To prevent messages from being lost during data sync, you can contact our sales manager to enable reliable data sync. After the service is activated, if the data sync fails, the CommsEase server performs retries up to 1000 times. If the API used to receive messages stops responding for a period of time, the CommsEase server can cache up to 500,000 messages. After the API resumes working, you can manually create delivery tasks and sync messages.
Was this page helpful?
  • Prerequisites
  • Background information
  • Procedure
  • Considerations