🔑Access Token
Also known as Auth Token, Token
A string an app sends with each request to prove it may use an API.
Think of it like
Think of it like a pool wristband. It lets you in for one hour.
Example
Lucy's phone app logs her in and gets an access token. For the next hour, every request carries that token instead of her password.
Why it matters
Apps never have to store or resend your password. A short-lived token limits the harm if it leaks.
Definition
Example code
http
GET /api/orders HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9...Common mistake
Key takeaways
- 1Proof on each request. Instead of a password.
- 2Short-lived. Often an hour.
- 3Keep it secret. Holding it is enough.