Domain name for API request: sts.intl.tencentcloudapi.com.
Obtain the MFA temporary certificate.
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: GetSessionToken. |
| Version | Yes | String | Common Params. The value used for this API: 2018-08-13. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| SerialNumber | Yes | String | MFA serial number, the identifier of the MFA device associated with the CAM user making the call. Format: qcs::CAM:uin/${ownerUin}::MFA/${mfaType}. mfaType supports softToken. |
| TokenCode | Yes | String | mfa identity verification code. |
| DurationSeconds | No | Integer | Validity period of the specified temporary certificate. Unit: second. Default value: 1800 seconds. The root account can set a validity period of up to 7200 seconds, and a sub-account can set a validity period of up to 129600 seconds. |
| Parameter Name | Type | Description |
|---|---|---|
| Credentials | Credentials | Temporary access credentials. |
| ExpiredTime | Integer | The time when the certificate is invalid, return Unix timestamp, accurate to second |
| Expiration | String | Expiration time of the temporary access credential in UTC time in iso 8601 format |
| 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. |
POST / HTTP/1.1
Host: sts.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: GetSessionToken
<Common request parameters>
{
"SerialNumber": "qcs::cam:uin/10001::mfa/softToken",
"TokenCode": "102342"
}
{
"Response": {
"Credentials": {
"Token": "da1e***",
"TmpSecretId": "AKID***",
"TmpSecretKey": "q95K***"
},
"ExpiredTime": 1744271441,
"Expiration": "2025-04-10T07:50:41Z",
"RequestId": "4rkgc443-9cd2-4f09-9e7a-7d4c43b2a74c"
}
}
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.CheckMFAError | MFA validation failed |
| FailedOperation.MFATypeNotSupported | MFA type not supported |
| FailedOperation.TempKeyNotAllowed | This API does not support temporary key calls. |
| InternalError.DbError | Database error. |
| InternalError.EncryptError | Encryption failed. |
| InternalError.GetSeedTokenError | Failed to obtain the token. |
| InternalError.PbSerializeError | pb packaging failed. |
| InternalError.SystemError | Internal system error, such as network error. |
| InternalError.UnknownError | Unknown error. |
| InvalidParameter.AccountNotAvaliable | The account does not exist or is unavailable. |
| InvalidParameter.OverTimeError | The expiration time exceeds the threshold. |
| InvalidParameter.ParamError | Invalid parameter. |
| UnauthorizedOperation | Unauthorized operation. |
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários