Projects.hmacKeys: list

Retrieves a list of HMAC keys matching the criteria..

For general information about HMAC keys in Cloud Storage, seeHMAC Keys.

Required permissions

In order to use this method, the authenticated user must have thestorage.hmacKeys.list IAM permission for the project in which thekeys exist.

Request

HTTP request

GET https://storage.googleapis.com/storage/v1/projects/projectIdentifier/hmacKeys

In addition tostandard query parameters, the following query parameters apply to this method.

To see an example of how to include query parameters in a request, see theJSON API Overview page.

Parameters

Parameter nameValueDescription
Path parameters
projectIdentifierstring The project ID or project number of the project in which to look for HMAC keys.
Optional query parameters
maxResultsunsigned integer Maximum number ofitems to return in a single page of responses.

The service may return fewer results thanmaxResults. If the response includes anextPageToken, there are more results not included in this response.
pageTokenstring A previously-returned page token representing part of the larger set of results to view.
serviceAccountEmailstringIf present, only HMAC keys for the given service account are returned.
showDeletedKeysbooleanIf true, include keys in theDELETED state. Default is false.

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response body with the following structure:

{"kind":"storage#hmacKeysMetadata","nextPageToken":string,"items":[MetadataportionofanhmacKeysresource]}
Property nameValueDescriptionNotes
kindstringThe kind of item this is. For lists of hmacKeys, this is always"storage#hmacKeysMetadata".
nextPageTokenstringThe continuation token. Provide this value as thepageToken of a subsequent request in order to return the next page of results. Note that the next page may be empty. If this is the last page of results, then no continuation token is returned. The presence of this parameter in the response should always be checked to ensure a complete listing of all the results.
items[]listThe list of items.

For information about status and error codes returned by this API, see thereference page.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.