Updated on 2026-09-30 GMT+08:00

Overview

IoTDA authenticates a device when the device attempts to access the platform. The authentication process depends on the access method.

Access Type

Authentication Mode

Device using LwM2M over CoAP

You can create a device either by calling the API (see Creating a Device) or using the IoTDA console. When connecting to the platform, a non-secure device does not use DTLS/DTLS+ and only carries the node ID for authentication. In contrast, a secure device uses DTLS/DTLS+ and carries both the secret and the node ID for authentication.

Device using MQTT or MQTTS

  • Using secrets:

    You can create a device either by calling the API (see Creating a Device) or using the IoTDA console. Once registered, hardcode the device ID and secret provided by the platform into the device. For devices using MQTTS, preconfigure a CA certificate on the device; this step is not required for devices using MQTT. When connecting to the platform, the device must carry the device ID and secret.

  • Using certificates:

    You can upload a device CA certificate on the IoTDA console, and register the device, either by calling the API (see Creating a Device) or using the console. After registration, hardcode the device ID provided by the platform into the device. When connecting to the platform, the device uses the X.509 certificate for authentication.

  • Using custom authentication:

    Before connecting a device to the platform, you can use the application to configure custom authentication information on the console, and then configure custom authentication functions by using FunctionGraph. When the device connects to IoTDA, the platform obtains parameters such as the device ID and custom authentication function name, and sends an authentication request to FunctionGraph. The user implements the authentication logic to complete access authentication.

  • Using custom templates:

    You can use a custom authentication template to orchestrate internal functions provided by the platform and flexibly customize triplet parameters ClientId, Username, and Password for MQTT device authentication.