Last Updated on : 2024-02-28 03:29:39download
Register a manufacturer's sub-device in Tuya's ecosystem.
POST: /v1.0/iot-03/3rdcloud/devices/{third_cloud_device_id}/sub/register
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
third_cloud_device_id | String | uri | true | The unique ID of a manufacturer's device. It can be a unique readable identifier of the specified device, such as device SN, MAC address, or IMEI. It contains no more than 64 characters, including only numbers, uppercase letters, and lowercase letters. |
Description of body
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
device_name | String | body | true | The name of the specified device, with no more than 50 characters. |
product_id | String | body | true | The ID of the specified Tuya-enabled device. |
gateway_id | String | body | true | The ID of the specified Tuya-enabled gateway device. |
options | Object | body | false | The extension information about the specified device. Valid values:
|
group_id | String | body | false | The binding ID, which can be the home ID or asset ID. If you want to bind a device with a user, you can select either the |
has_qrcode | Boolean | body | false | Specifies whether or not to generate a short URL for device pairing. If this parameter is selected, the short URL for device pairing will be returned in the response result. The manufacturer can generate a QR code based on the returned short URL and paste it on the device. After getting the device, a user can use a Tuya-enabled app to scan the QR code on the device, and thus bind the device with the user. If you want to bind a device with a user, you can select either the |
Parameter name | Type | Description |
---|---|---|
result | Object | The response result. |
code | String | The response code. It is empty if the request is successful. |
msg | String | The message that is returned if the request fails. It is empty if the request is successful. |
success | Boolean | Indicates whether the operation is successful. Valid values:
|
t | Long | The 13-digit timestamp of a response. |
Description of result
Parameter name | Type | Description |
---|---|---|
device_id | String | The ID of the specified Tuya-enabled device. |
short_url | String | The short URL for device pairing. |
POST: /v1.0/iot-03/3rdcloud/devices/A18007210830****/sub/register
{
"device_name": "Test Device",
"product_id": "xz0uukkq5oce****",
"gateway_id": "26f4b7ef5f6511cafb****",
"options": {
"mac": "48ea63fd****",
"installLocation": "****Jiangdun Road, Xihu District, Hangzhou City",
}
}
{
"result": {
"device_id": "6cf4171005d11e2ca7****"
},
"t": 1561456817168,
"success": true
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback