Obtains the identity of the user who is calling the API action.

Request parameters

Parameter Type Required? Example value Description
Action String Yes GetCallerIdentity

The name of this action.

Value: GetCallerIdentity

Response parameters

Parameter Type Example value Description
RequestId String 2C9BE469-4A35-44D5-9529-CAA280B11603 The request ID.
Arn String acs:ram::196813200012****:user/admin The Alibaba Cloud Resource Name (ARN) of the user who is calling the API action.
AccountId String 196813200012**** The ID of the Alibaba Cloud account to which the user who is calling the API action belongs.
UserId String 216959339000**** The ID of the user who is calling the API action. If the user is the owner of an Alibaba Cloud account, the AccountId parameter is returned.

Example

Request example

https://sts.aliyuncs.com?Action=GetCallerIdentity
&<Common parameters>        

Response example

XML format
<GetCallerIdentityResponse>
    <RequestId>2C9BE469-4A35-44D5-9529-CAA280B11603</RequestId>
    <AccountId>196813200012****</AccountId>
    <UserId>216959339000****</UserId>
    <Arn>acs:ram::196813200012****:user/admin</Arn>
</GetCallerIdentityResponse>
JSON format
{
    "RequestId": "2C9BE469-4A35-44D5-9529-CAA280B11603",
    "AccountId": "196813200012****",
    "UserId": "216959339000****",
    "Arn": "acs:ram::196813200012****:user/admin"
}

Errors

None.