Domain name for API request: mqtt.intl.tencentcloudapi.com.
Create a device signature for per-device secret
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: CreateDeviceIdentity. |
| Version | Yes | String | Common Params. The value used for this API: 2024-05-16. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| InstanceId | Yes | String | Tencent Cloud MQTT instance ID can be obtained from the DescribeInstanceList api or the console. |
| DeviceId | Yes | String | Device ID |
| Status | No | String | 1:ENABLED - Available (default) 2: DISABLED - Unavailable |
| PrimaryKey | No | String | Primary signature key. Automatically generated by the system if not provided. base64 encode is required. |
| SecondaryKey | No | String | Secondary signature key. Automatically generated by the system if not passed. base64 encoding is required. |
| PropagatingProperties.N | No | Array of PropagatingProperty | Device id propagating properties setting |
| Parameter Name | Type | Description |
|---|---|---|
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
Example
POST / HTTP/1.1
Host: mqtt.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateDeviceIdentity
<Common request parameters>
{
"InstanceId": "mqtt-qzgaq8bk",
"DeviceId": "device-2",
"Status": "1",
"PrimaryKey": "pk1",
"SecondaryKey": "sk1",
"PropagatingProperties": [
{
"Key": "key-1",
"Value": "key-b"
}
]
}
{
"Error": null,
"RequestId": null,
"Response": {
"RequestId": "30a1df4f-1a90-4241-8f77-9e568f5d0149"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation.InstanceNotReady | FailedOperation.InstanceNotReady |
| UnsupportedOperation.ResourceAlreadyExists | UnsupportedOperation.ResourceAlreadyExists |
フィードバック