Domain name for API request: sts.tencentcloudapi.com.
This API is used to get the identity information of the current caller.
The persistent keys of the root account and sub-account as well as the temporary credentials generated by AssumeRole
and GetFederationToken
can be used to get the identity information.
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: GetCallerIdentity. |
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. |
Parameter Name | Type | Description |
---|---|---|
Arn | String | ARN of the current caller. |
AccountId | String | Root account UIN of the current caller. |
UserId | String | User ID. 1. If the caller is a Tencent Cloud account, the UIN of the current account is returned. 2. If the caller is a role, roleId:roleSessionName is returned.3. If the caller is a federated user, uin:federatedUserName is returned. |
PrincipalId | String | Account UIN. 1. If the caller is a Tencent Cloud account, the UIN of the current account is returned. 2. If the caller is a role, the UIN of the account that applies for the role is returned. |
Type | String | Identity type. |
RequestId | String | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
AssumeRole
https://sts.tencentcloudapi.com/?Action=GetCallerIdentity
&<Common request parameters>
{
"Response": {
"Type": "CAMRole",
"AccountId": "1000262***",
"UserId": "461168601842741***:roleSessionName",
"PrincipalId": "1000261****",
"Arn": "qcs::sts:1000262***:assumed-role/461168601842741***",
"RequestId": "1c875b55-128b-4152-9e73-0984fd489ba2"
}
}
GetFederationToken
https://sts.tencentcloudapi.com/?Action=GetCallerIdentity
&<Common request parameters>
{
"Response": {
"Type": "CAMUser",
"AccountId": "1000262***",
"UserId": "1000261****:federatedUserName",
"PrincipalId": "1000261****",
"Arn": "qcs::sts:1000262***:federated-user/1000261****",
"RequestId": "1c875b55-128b-4152-9e73-0984fd489ba2"
}
}
https://sts.tencentcloudapi.com/?Action=GetCallerIdentity
&<Common request parameters>
{
"Response": {
"Type": "CAMUser",
"AccountId": "1000262***",
"UserId": "1000261***",
"PrincipalId": "1000261****",
"Arn": "qcs::cam:1000262***:uin/1000261***",
"RequestId": "1c875b55-128b-4152-9e73-0984fd489ba2"
}
}
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.AccessKeyIllegal | Invalid key. |
InternalError.GetSeedTokenError | Failed to obtain the token. |
InvalidParameter.AccessKeyNotSupport | This type of key is not supported. |
Was this page helpful?