Note:
This is a legacy API which has been hidden and will no longer be updated. We recommend using the new CMQ API 3.0 which is standardized and faster.
A complete Tencent Cloud API request requires two types of request parameters: common request parameters and API request parameters. This article will introduce six common request parameters that Tencent Cloud needs to use in API request. For more information on API request parameters, please see API Request Parameters Chapter.
Common request parameters are the request parameters that every API needs to use. Developers need to bring these common request parameters every time they use Tencent Cloud API to send requests, otherwise the request will fail. Also, you need to capitalize the first letter in each common request parameter so that it can be differentiated from a API request parameter.
The following lists the specific common request parameters:
Note:
The interface examples in this article take Tencent Cloud CVM as an example. Please correspond to the actual products for the specific use of Tencent Cloud products.
Parameter name | Description | Type | Required |
---|---|---|---|
Action | The name of the instruction API for the specific operation, for example, Tencent Cloud CVM user calls Querying the List of Instances Interface, the Action parameter is DescribeInstances. | String | Yes |
Region | The region parameter, which is used to identify the instance of the region you want to operate on. For more information, see Regions and AZs List, or use the Query a list of regions API check. 1. Normally, this parameter is required, and if it does not need to be passed, it will be described in the appropriate API. 2. Some areas are under internal testing and are currently only open to some users. |
String | No |
Timestamp | Timestamp, the current UNIX, can record the time when the API request was initiated. | UInt | Yes |
Nonce | Users can customize random positive integers, combined with Timestamp, to prevent replay attacks. | UInt | Yes |
SecretID | In Cloud API Key A SecretId that identifies the identity applied on the SecretId, corresponds to a unique SecretKey, and the SecretKey is used to generate the request signature Signature. For details, please refer to Signature Method Chapter. | String | Yes |
Signature | The request signature, which is used to verify the validity of the request, needs to be calculated by the user according to the actual input parameters. The calculation method can be used for reference. Signature Method Chapter. | String | Yes |
SignatureMethod | Signature method. HmacSHA256 and HmacSHA1 are supported. The HmacSHA256 method is used to verify signatures only when the parameter is specified as HmacSHA256. Otherwise, HmacSHA1 is used. Please refer to the detailed signature calculation method. Signature Method Chapter. | String | No |
Token | The Token, used by temporary certificate needs to be used in conjunction with a temporary key. A token is not required when a long-term key is being used. | String | No |
The following examples show how a common request parameter looks like in a TencentCloud API request. For example, if you want to query the list of Tencent Cloud CVM instances in Guangzhou region, the desired request format is:
Https://cvm.api.qcloud.com/v2/index.php?Action=DescribeInstances&SecretId=xxxxxxx&Region=ap-guangzhou&Timestamp=1465055529&Nonce=59485&Signature=mysignature&SignatureMethod=HmacSHA256&<API Request Parameters>
문제 해결에 도움이 되었나요?