Securing a REST API means answering three questions on every request: who are you (authentication), what are you allowed to do (authorization), and is the channel private (transport). Because REST is stateless, credentials must travel with each request rather than living in a server session.
Transport: HTTPS always
Everything below assumes . Without it, tokens and API keys travel in plaintext and can be sniffed. This is non-negotiable — a bearer token over HTTP is a leaked token.
