// 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
- Register an app (panel on the right) — you get a
client_idand aclient_secret(shown once), plus agame_slugthat namespaces your scores and leaderboard. - Send players to the consent screen:
https://games.haolabs.co/oauth/authorize?client_id=…&redirect_uri=…&scope=identity records&state=… - Exchange the code for a token (server-side):
POST /api/v1/oauth/tokenwithgrant_type=authorization_code, code, client_id, client_secret→{access_token, expires_in}(30 days). - Call the API with
Authorization: Bearer <token>. CORS is open, so browser games can call it directly.
Endpoints
| Route | Scope | What it does |
|---|---|---|
GET /api/v1/me | identity | Player id, username, 18+ flag, team, member since |
GET /api/v1/me/records | records | Per-game aggregates + last 10 results (?game= filter) |
POST /api/v1/scores | records | {score, mode?, won?} — recorded under your game_slug; feeds player records + team standings |
GET /api/v1/me/wallet | wallet | Chip balance + whether chip play is available |
POST /api/v1/wallet/debit | wallet:spend | {amount, reason?} — max 2,000/tx, 5,000/day per player |
POST /api/v1/wallet/credit | wallet:spend | Refund/payout — an app can never credit more than it has debited |
GET /api/v1/leaderboard | public | ?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