tencent cloud

APIs

DescribeApiKey

Download
聚焦模式
字号
最后更新时间: 2026-07-09 11:20:48

1. API Description

Domain name for API request: tokenhub.intl.tencentcloudapi.com.

This API is used to query API Key details based on API Key ID or key value, and return the plaintext key. At least one of ApiKeyId and ApiKey must be input, with priority given to ApiKeyId.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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: DescribeApiKey.
Version Yes String Common Params. The value used for this API: 2026-03-22.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
Platform Yes String Platform type. Currently supported values: maas.
ApiKeyId No String API Key ID. At least one of this or ApiKey is required. Prioritize ApiKeyId.
ApiKey No String API key plaintext. At least one of it and ApiKeyId must be imported.

3. Output Parameters

Parameter Name Type Description
ApiKeyId String API Key ID.
Name String Name
ApiKey String API Key value (plaintext).
Remark String Remarks.
Platform String Platform type. Enumerate: maas.
Uin String Root account.
SubUin String Sub-account.
Status String Status. Valid values: enable, disable.
BindType String Binding type. Value: all (all models and access points), model_all_endpoint_custom (all models + custom access point), model_custom_endpoint_all (custom model + all access points), model_custom_endpoint_custom (custom model + custom access point).
CreateTime String Creation time. Format: YYYY-MM-DD HH:mm:ss.
UpdateTime String Last update time. Format: YYYY-MM-DD HH:mm:ss.
AppId String App ID.
Editable Boolean Whether it is editable. true means editable, false means non-editable.
BindingItems Array of BindingItem List of bound resources, case-sensitive for endpoint and model kind.
IpWhitelist Array of String IP allowlist. Supports IPv4 and CIDR format. Empty array indicates no restriction.
Creator String This field is empty when Platform is maas.
QuotaSet Array of QuotaInfo Multi-dimensional information of Token quota. This field is not returned when unconfigured.
QuotaStatus String Token quota status. An empty string means no configuration. active means configured with current availability. inactive means configured but quota exhausted.
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.

4. Example

Example1 DescribeApiKey

Input Example

POST / HTTP/1.1
Host: tokenhub.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeApiKey
<Common request parameters>

{
    "Platform": "maas",
    "ApiKeyId": "ak-20260609-f294a4aa4e2a7412780914226ad3ffd8"
}

Output Example

{
    "Response": {
        "ApiKey": "sk-7PNKNHibBH617l8ly8xTzUj5Jej359BOJMjguq2St22CVEtM",
        "ApiKeyId": "ak-20260609-f294a4aa4e2a7412780914226ad3ffd8",
        "AppId": "1300056794",
        "BindType": "all",
        "BindingItems": [],
        "CreateTime": "2026-06-09 20:55:16",
        "Creator": "",
        "Editable": true,
        "IpWhitelist": [],
        "Name": "my-api-key",
        "Platform": "maas",
        "Remark": "",
        "Status": "enable",
        "SubUin": "600000563014",
        "Uin": "600000563014",
        "UpdateTime": "2026-06-09 20:55:16",
        "RequestId": "9a5c9c84-0566-4a8c-9be9-135d834e668c"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InternalError.InternalError InternalError.InternalError
InvalidParameter.InvalidParameter InvalidParameter.InvalidParameter
InvalidParameterValue.InvalidParameterValue InvalidParameterValue.InvalidParameterValue
MissingParameter.MissingParameter MissingParameter.MissingParameter
ResourceNotFound The resource does not exist.
UnauthorizedOperation.UnauthorizedOperation UnauthorizedOperation.UnauthorizedOperation

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈