The Game API serves the AMB Fair Play game client: session, balance, lobby, rooms, betting, results, history and provably-fair checks for Thai Hilo (THAI-HILO) and Lotto — หวยเฮงเฮง (LOTTO).Base URL#
https://{game-api-domain}/gapi/v1 — the domain for each environment is provided by the relevant personnel. Every path in this collection already includes /gapi/v1.How a player arrives#
A real player never logs in on the game client. The agent calls the Open API Start Game, and AMB Fair Play returns a launch URL the agent redirects the player to:{gameDomain}/{gameCode}/?currency=THB&language=th&reurl=https%3A%2F%2Fagent.example.com%2Flobby&token=3f9a1c7e5b2d4f6081a3c5e7f9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5b7
| Query | Use |
|---|
token | The player's session token. Send it on every call as Authorization: Bearer {token} |
currency | The player's currency (upper case). Balances and rooms are per currency |
language | The language the agent asked for (ISO 639-1). Send it back as Accept-Language |
reurl | Optional. Where "back to lobby" should go. Absent when the agent sent none |
A demo player has no launch URL: the client calls Player → Demo → Demo Login and uses the token it returns. Demo players play with a demo balance and never see real rounds, tickets or results — every read and write is kept apart.Typical flow#
Games#
| Game | gameCode | gameID | Round style |
|---|
| Thai Hilo | THAI-HILO | 1 | Dice. Rooms in SINGLE mode play one bet at a time; MULTI and MULTI_CSEED rooms share rounds |
| Lotto — หวยเฮงเฮง | LOTTO | 2 | 6-digit draw per room and currency, shared rounds, tickets of up to 20 lines |
{gameCode} in a path is case-insensitive; send it upper case as listed.Where a route lives#
| Prefix | Holds |
|---|
/c/g/… | Routes every game shares — the lobby (/c/g/), and per game code: session, balance, provably fair |
/g/lotto/… | Lotto's own routes — its rooms (rooms/{roomId}/… and the room stream) and the หวยเฮงเฮง room list, round, pay table, tickets and results |
/g/thai-hilo/… | Thai Hilo's own routes — its room list (rooms), its rooms (rooms/{roomId}/… and the room stream), the single-player bet and server-seed rotation |
{game} in a /g/… path is the game code in lower case: lotto, thai-hilo. Rooms are per game because not every game has rooms. Modified at 2026-09-30 13:23:45