Getting Started
Official Site
Getting Started
Official Site
  • Document description
  • Read before you start

  • Light application development guide

  • Mobile application development guide

  • Cloud live development guide

  • Desktop application development guide

  • Third party development guide

  • Message push development guide

  • IoT things data model

  • HTTP interface

    • Development specification
    • API privacy policy
    • Postman interface simulation call
    • accessToken: Get administrator token
    • API request example
    • Account docking
    • Push configuration
    • Cloud storage service
    • Equipment management

      • Add device
        • bindDevice: Bind Device
        • unBindDevice: Unbind Device
      • Device query
      • Device maintenance
    • Device configurat

    • Video equipment

    • Device message
    • Device live broadcast
    • Device lock access
  • Reference documents

On this page
Function details
Request address
request format
Incoming parameter description
Sample input
Return data field description
Sample output

Bind Device Documentation - Integration Guide - Imou Open Platform

bindDevice: Bind device

Function details

Bind the device to the specified account.

Request address

https://openapi-[DataCenter].easy4ip.com/openapi/bindDevice

request format

Please refer to the Development Specification for the API request method and some authentication parameters such as sign calculation method

Incoming parameter description

Parameter nameParameter typeRequired or notDefault valueLegal valueParameter description
tokenStringYesAdministrator accessToken
deviceIdStringYesDevice serial number
codeStringYescode is collectively referred to as device verification code, but the code value transmitted for different devices will be different. It is necessary to determine whether the device to be bound has an auth capability set:
1. If the device has an auth capability set, the code value transmits the device password after the device is initialized;
2. If the device does not have an auth capability set but the label at the bottom of the device (or two) In the dimension code) there is a 6-digit security code, and the code value transmits the 6-digit number;
3. If the device does not have an auth capability set and there is no 6-digit security code in the label at the bottom of the device (or in the QR code), then Just pass the code value blank.
Device verification code or password
encryptCodeStringNoThis parameter refers to the encrypted code value and is not mandatory. Either the code parameter or the encryptCode parameter can be used, and if both are passed, the code will prevail. If the business has a high demand for security, the encryptCode parameter can be used, and the encryption rules are as follows.Encrypted device verification code or password

Password encryption algorithm detailed description: Password calculated formula is: Base64(AES256_CBC(code, Key[], IV[]); Encryption rules are as follows: 1.The algorithm is AES/CBC/PKCS5Padding in the method of encrypting the CBC packet; 2.The code is the plaintext verification code or password of the device; 3.Key[] is a binary array of key (Key); 4.key is LowerCase(MD5(UpperCase(Base64(KDF(deviceId,MD5(appsecret)))))), the KDF algorithm is PBKDF2WithHmacSHA256, iterates 1200 times, exports the secret key length 256; 5.IV[] is the binary array of initialized vector, which is: MD5(Appsecret), encrypting the MD5 algorithm of MessageDigest with Java.

Encryption Example: The device ID is TESTQWERXXXX, the app secret is 12345qwert67890asdfg12345qwert, the original code is Admin123, and the calculated encryptCode is 5ZtW6b0Ttf1zOiFhqynKaA==

Sample input

{
    "system":{
        "ver":"1.0",
        "appId":"lcdxxxxxxxxx",
        "sign":"69832b9ae3efe459bda3a0aaf0cc4a10",
        "time":1603352833,
        "nonce":"b52eb20c-c836-45d7-9a98-cded3cf2fa9b"
    },
    "id":"5d5c16ec-0ee4-4880-88dd-6ce602d1e138",
    "params":{
        "token":"At_00000ad9e6e87f0142eb92e207aec46a",
        "deviceId":"TESTQWERXXXX",
        "code":"Admin123"
    }
}

Return data field description

No data returned

Sample output

{
  "result":{
    "msg":"The operation was successful.",
    "code":"0"
  },
  "id":"5d5c16ec-0ee4-4880-88dd-6ce602d1e138"
}
unUsedCloudList: Get a list of cloud storage services that are not enabled
unBindDevice: Unbind Device