Definition
An API key is a unique code that a service gives a developer or app so it can call the service's interfaces. The key identifies the caller, tracks usage and often controls what the caller is allowed to do.
Treat API keys like passwords. Never place them in public code, screenshots or client-side scripts, because anyone who sees them can use them and possibly run up charges. Store keys in environment variables or a secrets manager.
If a key is exposed, revoke it immediately and create a new one. Use keys with the smallest permissions that the application needs.