Vanguard

Documentation

Everything you need to integrate Vanguard into your game.

Authentication

All API requests require a JWT token obtained via Discord OAuth through Exoliner.

POST/api/v1/login

Exchange an OAuth code from Exoliner for a JWT token. Called automatically during the login flow.

http
POST /api/v1/login
Content-Type: application/json

{
  "code": "<exoliner-oauth-code>"
}

Using the token

Include your JWT token in the Authorization header of every request. No "Bearer" prefix — just the raw token.

http
GET /api/v1/user/me
Authorization: <your-jwt-token>
GET/api/v1/user/me

Returns the authenticated user's profile, subscription rank, and balance.

Response — 200 OK
{
  "id": 1,
  "username": "player123",
  "email": "[email protected]",
  "rank": "PRO",
  "balance": 25,
  "discordid": "123456789012345",
  "sellerAuthorization": false,
  "avatar": "https://cdn.discordapp.com/avatars/..."
}

Ranks

NONEFree tier — limited features
PRO$10/mo — advanced features, 100K requests
MAX$20/mo — unlimited requests, early access
STAFFStaff member
OWNERPlatform owner
GET/api/v1/user/limit

Returns the user's current request limits and usage.

Tokens expire after a period of inactivity. If you receive a 401 response, redirect the user to re-authenticate.