Queries the AccessKey pairs of an Alibaba Cloud account or a RAM user.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListAccessKeys

The operation that you want to perform. Set the value to ListAccessKeys.

UserPrincipalName String No test@example.onaliyun.com

The logon name of the RAM user.

If this parameter is empty, the AccessKey pairs of the current user are queried.

Response parameters

Parameter Type Example Description
AccessKeys Array of AccessKey

The list of AccessKey pairs.

AccessKeyId String 0wNEpMMlzy7s****

The AccessKey ID.

CreateDate String 2020-10-13T12:33:18Z

The time when the AccessKey pair was created.

Status String Active

The status of the AccessKey pair. Valid values:

  • Active
  • Inactive
UpdateDate String 2020-10-13T12:33:18Z

The time when the AccessKey pair was updated.

RequestId String 4B450CA1-36E8-4AA2-8461-86B42BF4CC4E

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format


JSON format

  "RequestId" : "4B450CA1-36E8-4AA2-8461-86B42BF4CC4E",
        "AccessKeyId": "0wNEpMMlzy7s****",
        "Status": "Active",
        "CreateDate": "2020-10-13T12:33:18Z",
        "UpdateDate": "2020-10-13T12:33:18Z"
        "AccessKeyId": "WnIWUruvfaDT****",
        "Status": "Inactive",
        "CreateDate": "2020-10-14T12:33:18Z",
        "UpdateDate": "2020-10-14T21:12:21Z"

Error codes

For a list of error codes, visit the API Error Center.