The content of this page has been automatically translated by AI. If you encounter any problems while reading, you can view the corresponding content in Chinese.

User Control Device

Last updated: 2025-04-30 15:35:01

1. API Description

api request domain name: iot.cloud.tencent.com/api/exploreropen/tokenapi. This interface (AppControlDeviceData) is used for users to initiate control operations on bound devices.

2. Input Parameter

Name
Type
Required
Description
AccessToken
String
Yes
Common parameter. AccessToken is used for user authentication of a logged-in user.
RequestId
String
Yes
Common parameter. Unique request ID can be generated manually. It is recommended to use uuId. When locating issues, provide the RequestId for the request.
Action
String
Yes
Common parameter. This interface takes values: AppControlDeviceData.
ProductId
String
Yes
product ID.
DeviceName
String
Yes
Device name.
Data
String
Yes
Control device message.

3. Output Parameter

Name
Type
Description
RequestId
String
Common parameter. Unique request ID can be generated manually. It is recommended to use uuId. When locating issues, provide the RequestId for the request.
Data
String
Return data.

4. Example

Input example
POST https://iot.cloud.tencent.com/api/exploreropen/tokenapi HTTP/1.1
content-type: application/json
{
"RequestId": "req_1",
"AppId": 1111,
"Action": "AppControlDeviceData",
"ProductId":"22F9Y6II7O",
"DeviceName":"light1",
"Data":"{\"light_switch\":0}",
"AccessToken": "8b******************b8ec"
}
Output sample: successful
{
"Response": {
"Data": "",
"RequestId": "req_1"
}
}

5. Error Code

Error Code
Description
InternalError
Internal error.
InvalidParameterValue
Invalid parameter value.
InvalidParameterValue.InvalidAccessToken
The Token is invalid.