Send Business Notification
Brief Description
- The business service sends a custom notification, and the client receives the OnRecvCustomBusinessMessage callback
 
Request Method
post
Request URL
{API_ADDRESS}/msg/send_business_notification
Header
| Header Name | Example Value | Optional | Type | Description | 
|---|---|---|---|---|
| operationID | 1646445464564 | Required | string | Used for global trace tracking; suggested to use a unique timestamp per request | 
| token | eyJhbxxxx3Xs | Required | string | Admin token | 
Request Parameters Example
{
  "sendUserID": "openIMAdmin",
  "recvUserID": "2839678182",
  "recvGroupID": "",
  "key": "xxx",
  "data": "xxxxxx",
  "sendMsg": false,
  "reliabilityLevel": 1
}
| Field Name | Optional | Type | Description | 
|---|---|---|---|
| sendUserID | Required | string | System notification ID, or user ID | 
| recvUserID | Optional | string | Receiver user ID, can only choose one from recvGroupID | 
| recvGroupID | Optional | string | Receive group ID, you can only choose one from recvUserID | 
| key | Required | string | Depending on the business classification, the client can process data in different ways by changing the field | 
| data | Required | string | Business data | 
| sendMsg | Optional | bool | Whether to send as a message, default: false | 
| reliabilityLevel | Optional | int | The reliability of notification messages is as follows: 1: Online push. 2: Must-reach notification (will also be triggered by disconnection and reconnection or re-login, used for scenarios where must-reach notifications are required. At this reliability level, since it is a sequential full synchronization, it is recommended not to send too many messages, otherwise it will affect the client message synchronization performance). Default: 1 | 
Success Response Example
{
  "errCode": 0,
  "errMsg": "",
  "errDlt": "",
  "data": {
    "serverMsgID": "8698dd5d163dd79b8fdfa333fee06f40",
    "clientMsgID": "1ca0e4cf279ad5cce6b28331b2b42092",
    "sendTime": 1679558586210
  }
}
Success Response Parameters Description
| Parameter Name | Type | Description | 
|---|---|---|
| errCode | int | Error code; 0 indicates success | 
| errMsg | string | Brief error message, empty if none | 
| errDlt | errDlt | Detailed error information, empty if none | 
| data | object | General data object, structure detailed below | 
| serverMsgID | string | Server message ID; reserved field | 
| clientMsgID | string | Client message ID; unique ID for message | 
| sendTime | int | Time the message was sent | 
Failure Response Example
{
  "errCode": 1004,
  "errMsg": "RecordNotFoundError",
  "errDlt": ": [1004]RecordNotFoundError"
}
Failure Response Parameters Description
| Parameter Name | Type | Description | 
|---|---|---|
| errCode | int | Error code, refer to global error code documentation | 
| errMsg | string | Brief error message | 
| errDlt | errDlt | Detailed error information |