授权消息推送
# 事件消息格式定义
# 终端用户托管设备给开发者后推送此消息
{
"warrantId": "146746972164984832",
"msgType": "warrantInit",
"phone": "158***404",
"appId": "lcdxxxxxxxxx",
"deviceList": [
{
"authority": "RecordReplay,Format",
"channelName": "TP1S-2113",
"deviceId": "TESTQWERXXXX",
"deviceName": "TP1S-2113",
"channelId": "0"
}
],
"remark": "",
"state": "qwetyewoewewyriuweyriwhd" //开发者在托管链接中传递的state参数,平台原样返回。详情参考“设备托管说明”目录--“业务参数扩展”章节
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 终端用户取消设备托管后推送此消息
{
"msgType": "deviceAuthCancel",
"appId": "lcdxxxxxxxxx",
"deviceList": [
{
"deviceId": "TESTQWERXXXX"
}
]
}
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
# 终端用户修改已托管设备的权限后推送此消息
{
"warrantId": "146109321904787456",
"msgType": "warrantModify",
"phone": "18***096",
"appId": "lcdxxxxxxxxx",
"deviceList": [
{
"authority": "Format,Config,Siren,Ptz,WhiteLight,Alarm,Upgrade,Capture",
"deviceId": "TESTQWERXXXX",
"deviceName": "TP1S-4574",
"channelId": "0"
}
]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
注:此消息会推送终端用户修改的托管申请单下所有有权限的设备信息
# 终端用户解绑或者转移设备后推送此消息
{
"msgType": "authorityRemove",
"warrantId": "146690789022502912",
"appId": "lcdxxxxxxxxx",
"deviceId": "TESTQWERXXXX",
"operation": "unbindDevice"//transferDeviceFrom设备转移,unbindDevice设备解绑
}
1
2
3
4
5
6
7
2
3
4
5
6
7