Projects.hmacKeys: create Stay organized with collections Save and categorize content based on your preferences.
Creates a new HMAC key for the specified service account.
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.create IAM permission on the project in which the keywill be created.
Request
HTTP request
POST 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 name | Value | Description |
|---|---|---|
| Path parameters | ||
projectIdentifier | string | The project ID or project number of the project that owns the service account. |
| Required query parameters | ||
serviceAccountEmail | string | The email address of the service account. |
Request body
Do not supply a request body with this method.
Response
If successful, this method returns aProjects.hmacKeys resource in the response body.
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.