User Authentication (Session Cookie)
Users authenticate via a Discord-based login code flow. Once verified, a session cookie (hsession) is set and used for subsequent requests.
Flow
Request a login code
Call
POST /v1/authentication/request with your Discord ID or username. The bot will DM you a code.Example
Bot Authentication (API Key)
Bots authenticate using an API key passed in theX-API-Key header. API keys are generated when a bot is registered via the admin panel.
Usage
Admin Authentication
Admin users authenticate through the same login flow as regular users. There are no separate admin auth endpoints — permission checks happen per-request via session cookies. When an admin or owner logs in, the session cookie is automatically configured with a shorter TTL:- Cookie TTL: 1 day (vs 30 days for regular users)
SameSite=none, Secure=true, and domain .7331.org to work across subdomains (hapi, hws, portal, hansel).
Admin endpoints verify the caller’s permission level on every request. There is no separate “admin session” — the same hsession cookie is used for all authenticated requests.
