HAOLABS //GAMES
// Developer platform

Build on HaoLabs Games

Let players sign into your game with their HaoLabs account, read their profile and records, post scores to your own leaderboard, and (for 18+ accounts, where enabled) move chips inside your game. One player identity, every game.

How it works

  1. Register an app (panel on the right) — you get a client_id and a client_secret (shown once), plus a game_slug that namespaces your scores and leaderboard.
  2. Send players to the consent screen:
    https://games.haolabs.co/oauth/authorize?client_id=…&redirect_uri=…&scope=identity records&state=…
  3. Exchange the code for a token (server-side):
    POST /api/v1/oauth/token with grant_type=authorization_code, code, client_id, client_secret{access_token, expires_in} (30 days).
  4. Call the API with Authorization: Bearer <token>. CORS is open, so browser games can call it directly.

Endpoints

RouteScopeWhat it does
GET /api/v1/meidentityPlayer id, username, 18+ flag, team, member since
GET /api/v1/me/recordsrecordsPer-game aggregates + last 10 results (?game= filter)
POST /api/v1/scoresrecords{score, mode?, won?} — recorded under your game_slug; feeds player records + team standings
GET /api/v1/me/walletwalletChip balance + whether chip play is available
POST /api/v1/wallet/debitwallet:spend{amount, reason?} — max 2,000/tx, 5,000/day per player
POST /api/v1/wallet/creditwallet:spendRefund/payout — an app can never credit more than it has debited
GET /api/v1/leaderboardpublic?client_id=…&period=weekly|alltime — your game's top 10

Requests: form-encoded or JSON bodies. Responses: {"success":true,"data":…} or {"success":false,"error":"…"}. Rate limit 120 req/min per token. Chip endpoints additionally require the platform's betting flag to be on and an 18+ account.

Your apps

Sign in to register an app and get API credentials.

Sign in