monsterstack.kaik.io developer & agent API

Everything needed to build against https://monsterstack.kaik.io: identify your client, get a token, call the API. See how clients are identified below.

Get credentials

The registration endpoint (https://monsterstack.kaik.io/api/oauth/register, advertised as registration_endpoint in the authorization server metadata) issues credentials for pre-registered vendor platforms only: it matches your client_name against a known integration and returns that platform's client_id. It is not open dynamic client registration (RFC 7591) — an unrecognized client_name is refused with invalid_client_metadata.

A client we have not pre-registered is not issued credentials here — an unrecognized client_name is refused with invalid_client_metadata. Contact support or see https://docs.loopwise.com before building against this endpoint.

Registering here gives you a client that acts for a site operator. To act for a signed-in member — their enrollments, progress and orders — the site registers you: an operator creates the client in the site's own admin area (Developers → OAuth applications, which appears once they enable the “MCP connections” beta feature), picks its scopes, and hands you the client_id. Anyone with a role at that site can then authorize it, students included. There is no self-serve route to one, because a member token reads one person's data at one site and the site decides who may hold one.

The two differ in what they may ask for: account:read and account:write belong to the member audience, so an operator client requesting either is refused with invalid_scope, and a member client is limited to the scopes its operator selected.

PurposeEndpoint
Client registrationhttps://monsterstack.kaik.io/api/oauth/register
Authorizationhttps://monsterstack.kaik.io/oauth/authorize
Tokenhttps://monsterstack.kaik.io/api/oauth/token
UserInfohttps://monsterstack.kaik.io/api/oauth/userinfo
Revocationhttps://monsterstack.kaik.io/api/oauth/revoke

Authenticate

Authorization Code flow with PKCE (S256). Public clients use the none token-endpoint auth method, confidential clients client_secret_post.

1. Identify your client. A recognized vendor platform POSTs its client_name to https://monsterstack.kaik.io/api/oauth/register to obtain its client_id; any other client contacts support (see “Get credentials”).

2. Send the person to the authorization endpoint with your PKCE challenge:

https://monsterstack.kaik.io/oauth/authorize?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&scope=openid%20profile%20courses:read&code_challenge=CODE_CHALLENGE&code_challenge_method=S256&state=RANDOM

3. Exchange the returned code for tokens:

curl -X POST https://monsterstack.kaik.io/api/oauth/token \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'grant_type=authorization_code' \
  -d 'code=AUTHORIZATION_CODE' \
  -d 'redirect_uri=YOUR_REDIRECT_URI' \
  -d 'client_id=YOUR_CLIENT_ID' \
  -d 'code_verifier=CODE_VERIFIER'

4. Call the API:

curl https://monsterstack.kaik.io/api/oauth/userinfo \
  -H 'Authorization: Bearer ACCESS_TOKEN'

Refresh with the refresh_token grant, and revoke at https://monsterstack.kaik.io/api/oauth/revoke (RFC 7009). Errors follow RFC 6749 §5.2: a JSON body with error and error_description; an invalid token is 401 invalid_token and a token missing a scope is 403 insufficient_scope. The full walkthrough is at /auth.md.

Scopes

ScopeGrants
openidOpenID Connect authentication
profileBasic profile information
emailEmail address
courses:readRead access to courses
courses:writeWrite access to courses
students:readRead access to students
students:writeWrite access to students
members:readRead access to members
members:writeWrite access to members
analytics:readRead access to analytics
curriculum:readRead access to curriculum
curriculum:writeWrite access to curriculum
orders:readRead access to orders
school:readRead access to school
school:writeWrite access to school
appearance:readRead access to appearance
appearance:writeWrite access to appearance
events:readRead access to events
events:writeWrite access to events
membership_plans:readRead access to membership plans
membership_plans:writeWrite access to membership plans
coupons:readRead access to coupons
coupons:writeWrite access to coupons
posts:readRead access to posts
posts:writeWrite access to posts
subscriptions:readRead access to subscriptions
subscriptions:writeWrite access to subscriptions
digital_products:readRead access to digital products
digital_products:writeWrite access to digital products
comments:readRead access to comments
lecturers:readRead access to lecturers
lecturers:writeWrite access to lecturers
storage:writeWrite access to storage
forms:readRead access to forms
pages:readRead access to pages
pages:writeWrite access to pages
account:readRead access to account
account:writeWrite access to account

Command-line interface

The loopwise CLI (on npm) deploys Loopwise Pages and reads this API from your terminal, using the same OAuth flow as above.

npm install -g loopwise
loopwise auth login --school YOUR_SUBDOMAIN
loopwise pages push ./dist --page homepage

Machine-readable resources

Platform-wide documentation lives at https://docs.loopwise.com. Everything above is specific to https://monsterstack.kaik.io.