edit-icon download-icon


Last Updated: Sep 27, 2016

Interface description

Use this interface to get the identity of the caller (or the currently sign-in user).

Request parameters


  • Type: String
  • Required: Yes
  • Description: A required system parameter. The parameter value is “GetCallerIdentity”.

Return parameters


  • Type: String
  • Description: The tenant account ID of the caller.


  • Type: String
  • Description: It returns the RAM user ID if the caller is a RAM user, or returns the tenant account ID if the caller is a master account.


  • Type: String
  • Description: The Aliyun Resource Name (ARN) of the caller.

Operation examples

HTTP Request

  1. https://sts.aliyuncs.com?Action=GetCallerIdentity
  2. &<Public request parameters>

HTTP Response

XML format

  1. <GetCallerIdentityResponse>
  2. <RequestId>2C9BE469-4A35-44D5-9529-CAA280B11603</RequestId>
  3. <AccountId>1968132000123456</AccountId>
  4. <UserId>216959339000654321</UserId>
  5. <Arn>acs:ram::1968132000123456:user/admin</Arn>
  6. </GetCallerIdentityResponse>

JSON format

  1. {
  2. "RequestId": "2C9BE469-4A35-44D5-9529-CAA280B11603",
  3. "AccountId": "1968132000123456",
  4. "UserId": "216959339000654321",
  5. "Arn": "acs:ram::1968132000123456:user/admin"
  6. }
Thank you! We've received your feedback.