Stay organized with collections
Save and categorize content based on your preferences.
To delete an HMAC key for the specified service account, make a POST request
that is scoped to a project. The authenticated user must have
storage.hmacKeys.delete permission for the project from which the key will be deleted.
An HMAC key must be in an inactive state in order to delete it.
For general information about HMAC keys in Cloud Storage, see
HMAC Keys.
HTTP Request
POST https://storage.googleapis.com/?Action=DeleteAccessKey&AccessKeyId=AccessKeyId
[[["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-07 UTC."],[],[],null,["# Delete an HMAC key\n\n| **Caution:** HMAC keys cannot be recovered once you delete them.\n\nTo delete an HMAC key for the specified service account, make a `POST` request\nthat is scoped to a project. The authenticated user must have\n`storage.hmacKeys.delete` permission for the project from which the key will be deleted.\nAn HMAC key must be in an inactive state in order to delete it.\n\nFor general information about HMAC keys in Cloud Storage, see\n[HMAC Keys](/storage/docs/authentication/hmackeys).\n\nHTTP Request\n------------\n\n```\nPOST https://storage.googleapis.com/?Action=DeleteAccessKey&AccessKeyId=AccessKeyId\n```\n\n### Query string parameters\n\nRequest headers\n---------------\n\nUse the [common request headers](/storage/docs/xml-api/post-hmac-key#request-headers).\n\nResponse\n--------\n\nIf successful, this method returns a response body with the following structure: \n\n```\n\u003cDeleteAccessKeyResponse\u003e\n \u003cResponseMetadata\u003e\n \u003cRequestId\u003eEXAMPLE-REQUEST-ID\u003c/RequestId\u003e\n \u003c/ResponseMetadata\u003e\n\u003c/DeleteAccessKeyResponse\u003e\n```"]]