API keys vs OAuth for third-party access
When a static API key is enough and when delegated OAuth is the safer model for acting on a user's behalf.
Different jobs
An API key says “this program is allowed.” OAuth says “this user allowed this program, with this scope, for a while.” Mixing them up is how a leaked mobile key becomes a company-wide outage.
API keys fit
Server-to-server jobs you own, stored in a secret manager, rotated, never shipped in a browser. See API authentication patterns.
OAuth fits
A third-party app reading a user’s mail or calendar. Short-lived tokens. Revocation. The user can see and kill the grant.
Never put a privileged key in front-end JavaScript. See secrets management.
Related
Last verified: August 2026. Technology and pricing change — always confirm current details with the vendor.