1. API Description
API request domain name:
iot.cloud.tencent.com/api/exploreropen/tokenapi
This interface (AppCreateDeviceBindToken) is used to generate a random Token for the Wi-Fi configuration task.2. Input Parameter
Name | Type | Required | Description |
Action | String | Yes | Common parameter, this interface takes values: AppCreateDeviceBindToken. |
RequestId | String | Yes | Common parameter, unique request ID, can be generated manually, uuid is recommended. Locating issues, need to provide the RequestId for the request. |
AccessToken | String | Yes | Common parameter, AccessToken is used for user authentication of a logged-in user. |
3. Output Parameters
Name | Type | Description |
RequestId | String | RequestId. |
Token | String | Generated distribution network Token. |
4. Examples
Example 1 Generate a Wi-Fi Device Networking Token
Input example
POST https://iot.cloud.tencent.com/api/exploreropen/tokenapi HTTP/1.1content-type: application/json{"Action": "AppCreateDeviceBindToken","AccessToken":"bf******************d098","RequestId": "f92406b3-5a9a-4fe8-bc43-45e3d794bb68"}
Output sample: successful
{"Response": {"Data": {"Token": "d7*************1b3b","RequestId": "f92406b3-5a9a-4fe8-bc43-45e3d794bb68"}}}
Output sample: fail
{"Response": {"Error": {"Code": "InvalidParameterValue.InvalidAccessToken","Message": "Invalid Token"},"RequestId": "f92406b3-5a9a-4fe8-bc43-45e3d794bb68"}}
5. Error Code
Error Code | Description |
InvalidParameter | Invalid parameter. |
InvalidParameterValue | Invalid parameter value. |
InvalidParameterValue.TokenInfoSaveError | Token saving failed. |