Creates a new HMAC key for the specified service account.

For general information about HMAC keys in Cloud Storage, see
[HMAC Keys](https://docs.cloud.google.com/storage/docs/authentication/hmackeys.md.txt).

## Required permissions

In order to use this method, the authenticated user must have the
`storage.hmacKeys.create` IAM permission on the project in which the key
will be created.

## Request

### HTTP request

```
POST https://storage.googleapis.com/storage/v1/projects/projectIdentifier/hmacKeys
```

In addition to [standard query
parameters](https://docs.cloud.google.com/storage/docs/json_api/v1/parameters#query), the following query parameters apply to this method.

To see an example of how to include query parameters in a request, see the
[JSON API Overview](https://docs.cloud.google.com/storage/docs/json_api.md.txt#query_parameters) 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 a
[Projects.hmacKeys resource](https://docs.cloud.google.com/storage/docs/json_api/v1/projects/hmacKeys.md.txt#resource)
in the response body.

For information about status and error codes returned by this API, see the
[reference page](https://docs.cloud.google.com/storage/docs/json_api/v1/status-codes.md.txt).

## Try it!

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