In plain words
An auth header is a line on a request, usually Authorization: Bearer followed by a token, that tells the server who is asking so it can decide what to allow.
Where you see it
In the Network tab, click a request to your API and scroll to Request Headers: the Authorization line is what your app sends. In an HTTP client, open the Auth tab, pick Bearer Token and paste a token, and the client adds the header for you.
What goes wrong
- Using the secret key to make it work
Supabase's secret (service role) key skips every access rule, so the request succeeds and proves nothing. Test with a real user's token to see what that user can see.
- Leaving out the word Bearer
Most APIs expect Authorization: Bearer, one space, then the token. Send the token alone and you get a 401 that looks like a bad token.
Authorization: eyJhbGciOiJIUzI1NiIs... - Reusing a token that has expired
Sign-in tokens are short-lived, and Supabase's last an hour by default. A 401 that says JWT expired means copy a fresh token, not rewrite the code.
What to tell your agent
Quick check
Sign in to earn +10 XP for itYour request to Guildhall's API returns 401. The header reads Authorization: Bearer and a token you copied yesterday. Most likely cause?