setMessageCallback - Set the Alarm Callback Address - Imou Open Platform
setMessageCallback: Set the alarm callback address
Function details
Set the message callback address of the developer account.
Note: For the overall process of message push, please refer to Event Message Push Process
Request address
https://openapi-[DataCenter].easy4ip.com/openapi/setMessageCallback
Incoming parameter description
| Parameter name | Parameter type | Required or not | Default value | Legal value | Parameter description |
|---|---|---|---|---|---|
| token | String | Yes | Administrator accessToken | ||
| status | String | Yes | "on","off" | Whether to subscribe to news | |
| callbackUrl | String | No | "" | Required when message callback URL status is on; when status is off, it can be empty; | The address where the developer receives device messages must be accessible from the Internet |
| callbackFlag | String | No | "" | alarm: device alarm message push; deviceStatus: device online and offline message push; numberstat: device passenger flow data message push; faceAnalysis: device face intelligent message push | callback type identification, callback type is optional Fill in one or more of the above (separated by a comma). When status is on, it is required; when status is off, it can be empty. |
| basePush | String | No | "2" | "1": push; "2": no push |
Remarks: callbackFlag represents the category of event messages. For specific type definitions, please refer to Event Message Type Definition
Sample input
{
"system":{
"ver":"1.0",
"appId":"lcdxxxxxxxxx",
"sign":"85384489874412a2e9aa7ac3a8b08309",
"time":1603350639,
"nonce":"350f4c7a-a352-46cf-ae03-f4f526f5d99f"
},
"id":"b8f45dbb-79ad-4a7e-8b24-7eb618c5191f",
"params":{
"callbackFlag":"alarm,deviceStatus",
"basePush":"2",
"callbackUrl":"https://www.baidu.com",
"token":"At_00000ad9e6e87f0142eb92e207aec46a",
"status":"on"
}
}
Return data field description
No data returned
Sample output
{
"id":"b8f45dbb-79ad-4a7e-8b24-7eb618c5191f",
"result":{
"code":"0",
"msg":"The operation was successful"
}
}
