API keys are generally not considered secure; they are typically accessible to
clients, making it easy for someone to steal an API key. Keys often have no expiration, meaning a stolen key can be used indefinitely unless revoked or regenerated. Keys are supposed to be a secret known only by the client and
server, so they should not be communicated over an
insecure channel and can only be considered secure when used in conjunction with other security mechanisms such as
HTTPS. There are several risk scenarios when using API keys: • Developers may write
scripts that contain keys in
plaintext. • Developers may
hard-code keys into
source code, and forget that when they release the code. • Having unprotected keys in
mobile apps is dangerous. These risks generally stem from the key being in plaintext, which is potentially accessible to adversaries. == Incidents ==