MATRIX SPOOFER

API

The loader-facing JSON API. Requests and responses are compact JSON, plain HTTP on port 25735. Session tokens are JWTs; send one as X-Token: <token>, Authorization: Bearer <token>, or as "token" in the body.

Loader

MethodPathBody / notes
GET/api/statusService name, version, uptime, user count.
GET/api/healthPlain ok, for monitors.
POST/api/login{"username","password"} → success, token, username, expires_in, license, discord
POST/api/register{"username","password","license_key"?} → same shape as login
POST/api/verify{"token"} → {"valid":true,…} or {"valid":false,"message"}
POST/api/logout{"token"} revokes the session server-side.
POST/api/accountProfile, licence, devices, linked Discord.
POST/api/licenseCurrent licence state.
POST/api/license/redeem{"token","key"} applies a licence key.
GET/api/avatarLinked Discord avatar as image/png. Needs a token; 404 when nothing is linked.

Example

curl -s -X POST http://www.synapsemenu.lol/api/login \
  -H "Content-Type: application/json" \
  -d '{"username":"owner","password":"…"}'

curl -s http://www.synapsemenu.lol/api/avatar -H "X-Token: <token>" -o avatar.png

Operator

/api/admin/* accepts X-Admin-Token: <MSP_ADMIN_TOKEN> or an administrator's session token. Mint keys, list users, grant days and read the audit log. The Discord bot wraps the same operations as slash commands.

Web

MethodPathNotes
GET/dashboardAccount, licence, Discord link, devices.
GET/oauth/discordStarts the Discord handshake (identify scope).
GET/oauth/discord/callbackRegistered redirect URI.