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, see
HMAC Keys.
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
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Projects.hmacKeys: create\n\nCreates a new HMAC key for the specified service account.\n\nFor general information about HMAC keys in Cloud Storage, see\n[HMAC Keys](/storage/docs/authentication/hmackeys).\n\nRequired permissions\n--------------------\n\nIn order to use this method, the authenticated user must have the\n`storage.hmacKeys.create` IAM permission on the project in which the key\nwill be created.\n\nRequest\n-------\n\n### HTTP request\n\n```\nPOST https://storage.googleapis.com/storage/v1/projects/projectIdentifier/hmacKeys\n```\n\nIn addition to [standard query\nparameters](/storage/docs/json_api/v1/parameters#query), the following query parameters apply to this method.\n\nTo see an example of how to include query parameters in a request, see the\n[JSON API Overview](/storage/docs/json_api#query_parameters) page.\n\n### Parameters\n\n### Request body\n\nDo not supply a request body with this method.\n\nResponse\n--------\n\nIf successful, this method returns a\n[Projects.hmacKeys resource](/storage/docs/json_api/v1/projects/hmacKeys#resource)\nin the response body.\n\nFor information about status and error codes returned by this API, see the\n[reference page](/storage/docs/json_api/v1/status-codes).\n\nTry it!\n-------\n\nUse the APIs Explorer below to call this method on live data and see the response."]]