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.

Sending Device Sharing From the App

Last updated: 2025-04-30 15:36:02

1. API Description

api request domain name: iot.cloud.tencent.com/api/exploreropen/tokenapi. This interface (AppSendShareDeviceInvite) is used for sending device sharing invitations.

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, you need to provide the RequestId for the request.
Action
String
Yes
Common parameter. This interface takes values: AppSendShareDeviceInvite.
ProductId
String
Yes
product ID.
DeviceName
String
Yes
Device name.
ToUserID
String
Yes
ID of the shared user.

3. Output Parameters

Name
Type
Description
RequestId
String
Common parameter. Unique request ID, same as the input parameter. When locating issues, you need to provide the RequestId for the request.
Status
String
Request result.

4. Example

Input Example
POST https://iot.cloud.tencent.com/api/exploreropen/tokenapi HTTP/1.1
content-type: application/json
{
"Action": "AppSendShareDeviceInvite",
"AccessToken": "8b4a70dd16105f******************18edd4e78a3bb8ec",
"RequestId": "1555507435215",
"ProductId": "22F9Y6II7O",
"DeviceName": "light1",
"ToUserID":"123456"
}
Output Example: Succeed
{
"Response": {
"RequestId": "1555507435215",
"Status": "OK"
}
}
Output Example: Fail
{
"Response": {
"Error": {
"Code": "InvalidParameterValue.InvalidAccessToken",
"Message": "Invalid Token"
},
"RequestId": "1555507435215"
}
}

5. Error Code

Error Code
Description
InternalError
Internal error.
InvalidParameterValue
Invalid parameter value.
InvalidParameterValue.InvalidAccessToken
The Token is invalid.
InvalidParameterValue.NoPermission
User has no permission for the device.