Skip to content

Authentication

Open API v2 uses the OAuth2 client_credentials grant. There are no long-lived static API keys — you exchange the credentials issued in the dashboard for a 15-minute ES256 access token and call with Authorization: Bearer. The design minimizes the exposure window.

  1. Issue an API client from the Developers menu in the dashboard → client_id + client_secret.
  2. Exchange for a 15-minute token at POST https://auth.kolleges.net/token (server-side · on every expiry).
  3. Call https://openapi.kolleges.net/v2/… with the token as Authorization: Bearer.

Present client_id + client_secret via HTTP Basic.

Terminal window
curl -s -u "$CLIENT_ID:$CLIENT_SECRET" \
-d 'grant_type=client_credentials' \
-d 'scope=kolleges:openapi:issuance:write' \
https://auth.kolleges.net/token
Property Value
Algorithm ES256 (JWT)
Lifetime 900 seconds (15 minutes)
audience (aud) https://openapi.kolleges.net
issuer (iss) https://auth.kolleges.net
scope requested scope the client’s registered scope

Scopes live in the kolleges:openapi:<operation> namespace. deny-by-default — you can only request scopes registered on the client, and a token carries only the intersection of requested ∩ registered.

scope Purpose
kolleges:openapi:clubs:read Club identity · whether issuance is allowed
kolleges:openapi:issuance:read Issuance list · detail · file
kolleges:openapi:issuance:write Issue
kolleges:openapi:issuance:revoke Revoke (invalidate)
kolleges:openapi:achievements:read / :manage Read / author achievements
kolleges:openapi:designs:read / :manage Read / author designs
kolleges:openapi:billing:read Billing · entitlements
kolleges:openapi:events:read Event feed

If a client_secret leaks or needs periodic replacement, rotate it from the dashboard. Right after rotation the new and old secrets are both briefly valid (zero-downtime rollover), so token issuance isn’t interrupted mid-deploy. Once the rollover is complete, the previous secret is invalidated.