API key
X-API-Key header. For scripts, the MCP server, and anything that is not a
browser.Session cookie
Set when you sign in to the web app. Browser requests must send
credentials: 'include'.Creating an API key
There is no key management screen yet. Keys are created through the auth API, using your signed-in session — which means the simplest route is your browser’s console.1
Sign in to Brewgravity
Open brewgravity.com and sign in normally.
2
Open the browser console
⌘⌥J on macOS, CtrlShiftJ on Windows and Linux.
3
Create the key
4
Copy the key
The response contains a
key field. This is the only time the full key is
ever returned — copy it now, into a password manager or an environment
variable, not into a file you will commit.Managing keys
The same auth API lists and revokes them, again from a signed-in browser:Using a key
Send it in theX-API-Key header on every request:
Checking a key works
401 Unauthorized with
{"error":"Unauthorized"}. There is no distinction between the cases, by
design.
Browser requests
If you are calling the API from a browser onbrewgravity.com — a bookmarklet,
a console snippet, a userscript — the session cookie already works and you do
not need a key: