An API key is a value an application sends to a service when making a request. Depending on the service, it can identify a project, authenticate access or determine how usage is billed.
How it works
An API, or application programming interface, lets software communicate with another service. Some keys are public identifiers with restrictions, while others act as secrets that authorize actions or charges. Check the provider’s documentation and treat keys that grant access as sensitive.
Why it matters
If a usable key is exposed, someone else may be able to use the service, access resources or incur charges within its permissions. Removing it from a public file does not necessarily invalidate copies already made.
What you can do
If a sensitive key is exposed, revoke or rotate it through the provider from a trusted environment, update affected applications, review usage and access logs, and investigate other accessible credentials. Restrict permissions and remove unused keys.
For more detail, Google Cloud explains API key restrictions and rotation. Read the reporting on stolen AI keys for a related Hacked.com report.
