bindDeviceChannelInfo (bindDeviceChannelInfo - Obtain Device Channel Information - Imou Open Platform)
bindDeviceChannelInfo: bindDeviceChannelInfo - Obtain Device Channel Information - Imou Open Platform
Legacy HTTP retained: For existing integrations. New integrations should use the Device APIs overview.
Function details
Get information about a single device channel.
Request address
https://openapi-[DataCenter].easy4ip.com/openapi/bindDeviceChannelInfo
Request format
HTTP POST. JSON body layout: Request conventions. Sign with Signature.
The sub-account token can request any permission
"Resource":"cam:Serial Number:Channel Number"
Incoming parameter description
| Parameter name | Parameter type | Required or not | Default value | Legal value | Parameter description |
|---|---|---|---|---|---|
| token | String | Yes | Administrator or sub-account accessToken | ||
| deviceId | String | Yes | Device serial number | ||
| channelId | String | Yes | Channel ID |
Sample input
{
"system":{
"ver":"1.0",
"appId":"lcdxxxxxxxxx",
"sign": "xjhCQBoJ9hRDsCjyDcHjtDNzRZ3ZJezcawsfWeiaoxU=",
"time":1603370040,
"nonce":"abd1e79d-d3b5-4760-959e-e7959a22cb5e"
},
"id":"65f772cf-ad91-49a5-aa90-bb344e3e0f7c",
"params":{
"deviceId":"TESTQWERXXXX",
"channelId":"0",
"token":"At_00000ad9e6e87f0142eb92e207aec46a"
}
}
Return data field description
| Field | Type | Description |
|---|---|---|
| deviceId | String | Device serial number |
| alarmStatus | Integer | Motion check switch state 0: closed state, 1: open state |
| channelId | Integer | Device channel number |
| channelName | String | Channel name |
| channelOnline | String | Whether it is online, online-online offline-offline close-not configured sleep-hibernation is upgrading |
| channelPicUrl | String | Thumbnail URL, new devices can update the field by refreshing the device channel cover image or uploading the device channel cover image |
| shareStatus | String | "": The device belongs to itself; "share": Share to this user through Lecheng app; "auth": Authorize to this user through Lecheng PC client; "shareAndAuth": Share to this user through Lecheng app And authorized to this user through easy4ip PC client |
| shareFunctions | String | Optional, a list of permissions and functions to be shared and authorized (separated by commas) |
| csStatus | String | Cloud storage status, notExist: the package has not been activated, using: cloud storage has been activated and has not expired, expired: the package has expired |
Note: When there is no channel on the device, the interface only returns the deviceId field, other fields do not return
Sample output
{
"result":{
"msg":"The operation was successful.",
"code":"0",
"data":{
"csStatus":"notExist",
"shareFunctions":"",
"alarmStatus":1,
"channelName":"TP1S-1842",
"channelOnline":"online",
"channelAbility":"PTZ,MDW,MDS,ChnLocalStorage",
"deviceId":"TESTQWERXXXX",
"channelId":0,
"channelPicUrl":"",
"shareStatus":""
}
},
"id":"65f772cf-ad91-49a5-aa90-bb344e3e0f7c"
}
Error codes
This method may return the codes below. See Return codes and Capability errors for the full catalog.
Gateway and auth (SN / TK / OP)
| Code | Meaning | Next step |
|---|---|---|
SN1001 | Signature error | Check sign per Development specification |
TK1002 | Token invalid or expired | Refresh accessToken |
OP1002 | Missing required parameter | Add required fields |
OP1003 | Invalid parameter | Match this page’s parameter table |
OP1009 | Permission denied | Check token and device bind/share grants |
OP1013 | Total call limit exceeded | Reduce call rate |
OP1014 | Daily per-interface limit exceeded | See Interface call limits |
DV1007 | Device offline | Wait until the device is online |
See Return codes · OP/SN/TK for the full catalog.
Sub-accounts (SUB)
| Code | Meaning | Next step |
|---|---|---|
SUB1001–SUB1002 | Sub-account lacks API permission | Update policy via addPolicy |
SUB1005 | Sub-account token expired | Refresh subAccountToken |
SUB1006 | No device grant for sub-account | Check Resource and device serial |
SUB1008 | Sub-account not bound to app | Create and bind the sub-account first |
See Return codes · SUB.
Device binding (DV10xx)
| Code | Meaning | Next step |
|---|---|---|
DV1001 | Bound to another account | Unbind or use another device |
DV1002 | Device does not exist | Verify serial number |
DV1003 | Already bound to current account | No need to bind again |
DV1005 | Verification code error | Check device label code |
DV1008 | Bind count limit exceeded | Unbind extra devices |
DV1011 | Device not bound | Bind first |
DV1029 | Device already bound | Do not bind again |
See Return codes · DV.
