Documentation
Authentication
Session cookies, bearer tokens, and CLI browser login helpers
API Authentication
Use browser session or bearer token.
Bearer Token
bash
curl -H "Authorization: Bearer cache_pat_..." \
http://localhost:3000/api/v1/auth/whoamiResponse:
json
{
"ok": true,
"data": {
"userId": "user-1"
}
}Create API Token
Requires browser session:
bash
curl -X POST \
-H "Content-Type: application/json" \
-d '{"name":"CLI token"}' \
http://localhost:3000/api/v1/auth/tokensBrowser Login Helpers for CLI
Start login redirect:
bash
GET /api/v1/auth/browser-login?callback=http://127.0.0.1:4567/callback&name=CLI%20tokenExchange code:
bash
curl -X POST \
-H "Content-Type: application/json" \
-d '{"code":"exchange-code"}' \
http://localhost:3000/api/v1/auth/browser-login/exchangeCallback must be localhost loopback URL.