All Products
Search
Document Center

Marketplace:Batch Register Device

Last Updated:Apr 07, 2025

Important

DISCLAIMER

Please note that all content presented on this page is provided by Tuya (HK) Limited. Alibaba Cloud makes no representations and warranties, explicit or implied, as to the authenticity or accuracy of any such content, nor makes any guarantee to the condition, quality, durability, performance, reliability, merchantability or fitness for a particular purpose, or non-infringement of any products and/or services made available by Tuya (HK) Limited. 

Call this operation to register multiple devices (randomly generate device names) under a specified product.

Description of batch registration device method

Device names are randomly generated by the system for bulk registration of devices. Call this interface to register devices in batches. A successful result is returned, indicating that the application for batch registration has been submitted successfully. The actual registration is performed asynchronously and there will be a process.

Request Parameters

Name

Type

Required

Sample Values

Description

Action

String

Yes

BatchRegisterDevice

System defined parameters. Value: BatchRegisterDevice.

Count

Integer

Yes

100

The number of devices to enroll.

ProductKey

String

Yes

A1BwAGV * * * *

The ProductKey of the device to be registered.

Note: When calling an API, in addition to the API-specific request parameters described in this topic, you must also pass in the common request parameters. For more information about common request parameters, see Common parameters.

Return data

Name

Type

Sample Values

Description

Code

String

Iot.system.SystemException

The error code returned when the call fails. For more information, see Error codes.

Data

Struct

The data returned when the call is successful.

ApplyID

Long

1295006

The application batch ID returned by the system when the call is successful.

ErrorMessage

String

System Exception

Error information returned when the call fails.

RequestID

String

E55E50B7-40EE-4B6B-8BBE-D3ED55CCF565

The unique identifier generated for this request.

Success

Boolean

True

Indicates whether the call succeeded.

  • True : The call succeeded.

  • False : The call failed.

Example

Request Example

curl 'https://si-d6e8d812acb848958054.tuyacloud.com:8686/?Action=BatchRegisterDevice&SignatureNonce=c5a39a00786d49f18935042e6dff33b6&AccessKeyId=xMr9wgwXQLhv5AUa65o03mcD&SignatureMethod=HMAC-SHA1&Count=2&Timestamp=2024-11-19T08%3A24%3A28Z&ProductKey=k1ymv1DuLfE&Signature=8v%2F9ELT4S8VVCLHjfsVcWxic6OM%3D'

Normal Return Example

{
	"Data": {
		"ApplyId": 12345678
	},
	"RequestId": "92C67DC1-41B5-45F8-9AFD-1FB42448D405",
	"Success": true
}