Help Center> IoT> API Reference> MQTT Interface Reference> Overview> Flow Description> Device Registration (One-Device-One-Secret)
Updated at: 2022-02-24 GMT+08:00

Device Registration (One-Device-One-Secret)

Device registration (one-device-one-secret mode) can be conducted in any of the following ways:

  • Call the northbound API to register devices.

    The device registration API (/iocm/app/reg/v2.0.0/deviceCredentials) is used to register a device with the IoT platform in one-device-one-secret mode. After a device is successfully registered, the IoT platform will return a device secret. The mqttConnect field is added by this API to distinguish the devices registered in this mode.

    Parameter

    Mandatory or Optional

    Type

    Description

    mqttConnect

    Optional

    Boolean

    • True: indicates that the one-device-one-secret registration mode is adopted. After the registration is successful, the device ID and secret are returned.
    • False: indicates that the original registration mode is adopted. After the registration is successful, verifyCode of the device is returned. When the device accesses the IoT platform for the first time, the device ID and secret are obtained by entering the verification code.
  • Register a device on the management portal.

    Choose Device Manage > Device > Registration > Single Registration, click Register, and enter the required device information. After the device is successfully registered, deviceId and secret are returned.

close