Contact Us
Log In

Register Device

Last Updated on : 2022-05-05 10:00:19

Register a third-party device in Tuya's ecosystem.

API address

POST: /v1.0/iot-03/3rdcloud/devices/{third_cloud_device_id}/register

Request parameter

Parameter nameTypeINRequiredDescription
third_cloud_device_idStringuritrueThe ID of a specified device of a partner. It can be a unique readable identifier of the device, such as device SN, MAC address, or IMEI. The length should not exceed 32 characters.

Description of body

Parameter nameTypeINRequiredDescription
device_nameStringbodytrueThe name of a specified device, with no more than 50 characters.
product_idStringbodytrueThe ID of a Tuya product.
optionsObjectbodyfalseThe extension information about a specified device. Valid values:
  • installLocation: installation location.
  • outProjectId: the project ID of the device in the partner cloud.
  • mac: the MAC address.
  • extendData: the extension data in JSON format, such as: {"roomNo":"16"}, where roomNo is the hotel room number.

Return parameter

Parameter nameTypeDescription
resultObjectThe returned result.
codeBooleanThe response code. It is empty when the operation succeeded.
msgStringThe error message if the API call fails. It is empty if the operation succeeded.
successBooleanIndicates whether the operation is successful. Valid values:
  • true: success
  • false: failure.
tLongThe 13-digit timestamp of a response.

Description of result

Parameter nameTypeDescription
device_idStringThe ID of a Tuya device.

Request example

POST: /v1.0/iot-03/3rdcloud/devices/ A18007210830****/register
  "device_name": "Test Device",
  "product_id": "xz0uukkq5oce****",
  "options": {
    "mac": "48ea63fd****",
    "installLocation": "****Jiangdun Road, Xihu District, Hangzhou City",

Return example

    "result": {
        "device_id": "6cf4171005d11e2ca7****"
    "t": 1561456817168,
    "success": true

Error code

For more information, see error code.