Domain name for API request: car.intl.tencentcloudapi.com.
This API is used to create an MCP token (issue a token).
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: CreateMCPToken. |
| Version | Yes | String | Common Params. The value used for this API: 2022-01-10. |
| Region | No | String | Common Params. This parameter is not required for this API. |
| ExpireSeconds | Yes | Integer | Token expiration time Value range: [0, 2592000] Unit: seconds Default value: 86400 If this parameter is not specified, the default timeout is 1 day. The expiration time is the current time + the timeout period. |
| TokenName | No | String | Token name (comment) Format: Only a combination of Chinese characters, English letters, digits, and hyphens ("-") is supported. Maximum length: 16 characters |
| UserId | No | String | User Id Format: Only a combination of letters (A-Za-z), digits (0-9), and underscores (_) is supported. This UserId is always used to operate cloud rendering concurrent resources. Maximum length: 64 characters |
| Parameter Name | Type | Description |
|---|---|---|
| TokenId | String | TokenId |
| Token | String | MCP Token Keep the current value safe. It is required for subsequent communication with the MCP Server. Once lost, it cannot be viewed again. |
| 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. |
This example shows you how to get an MCP Token.
POST / HTTP/1.1
Host: car.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateMCPToken
<Common request parameters>
{
"ExpireSeconds": 50000,
"TokenName": "token*****id01",
"UserId": "v**to***_token_userid01"
}
{
"Response": {
"Token": "mcptok_1e993fa723ed62f56************************a435a95e361f11fdf49ce3c",
"TokenId": "tok_59f*******76ee22",
"RequestId": "4f151245-7a15-4ccf-9139-191add823c61"
}
}
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 |
|---|---|
| AuthFailure.UnauthorizedOperation | Request unauthorized. |
| FailedOperation | Operation failed. |
| InvalidParameter | Parameter error. |
| InvalidParameter.JsonParseError | JSON parsing error. |
| InvalidParameterValue | Invalid parameter value. |
| LimitExceeded.MCPToken | The number of MCP Tokens exceeds the quota limit. |
| OperationDenied | Operation denied. |
| ResourceInUse | The resource is occupied. |
피드백