🔑Bearer Token
Also known as Bearer, Bearer Authentication, Authorization: Bearer
A token that works for whoever holds it. It is sent in a header.
Think of it like
Think of it like cash. Whoever holds the note can spend it, no questions asked.
Example
Jack's script sends Authorization: Bearer with his token. Copied to a stranger's machine, the same line would work just as well.
Why it matters
Most web APIs use bearer tokens, so knowing the header is how you call them.
Definition
Example code
console
$ curl -H "Authorization: Bearer $TOKEN" https://api.example.com/ordersCommon mistake
Key takeaways
- 1Holder wins. No other proof.
- 2In a header. Authorization: Bearer.
- 3HTTPS only. Or it can be read.