1. Provably Fair
[Game] FairPlay API
  • Getting Started
    • Introduction
    • Session and Token
    • Request and Response
    • Real-time Events (SSE)
    • Lotto Rules — หวยเฮงเฮง
    • Provably Fair
  • Player
    • Demo
      • Demo Login
    • Player Bet History
      GET
  • Common
    • Game
      • By Game Code
        • Provably Fair
          • Set Client Seed
            POST
          • Verify Result
            POST
          • Get Revealed Server Seed
            GET
        • Check Session
          GET
        • Get Balance
          GET
        • Get Provably-Fair State
          GET
      • Lobby Game List
        GET
  • Wallet
    • Wallet Status
      GET
  • Game
    • Lotto (หวยเฮงเฮง)
      • Lotto Rules
      • Rooms
        • By Room
          • Join Round
          • Place Multi-player Bet
          • Get Round Result
          • Room Event Stream
      • Tickets
        • Create Ticket
        • Inquiry My Tickets
        • Get Ticket
      • Round
        • Get My Bets
        • Get My Result
        • Get Round Provably Fair
      • Results
        • Inquiry Results
      • Get Rooms
      • Get Current Round
      • Get Pay Table
  • Appendix
    • Game List
    • Error Codes
    • Rate Limits
  • Language List
    GET
  • Ping
    GET
  • Schemas
    • DemoLoginRequest
    • DemoLoginResponse
    • DemoProfileResponse
    • ProfileResponse
    • GetHistoryResponse
    • BetRecord
    • GameInfo
    • Room
    • GetGameResponse
    • BetRequest
    • Bet
    • BetResponse
    • BetResult
    • GetProvablyFairResponse
    • SetClientSeedRequest
    • SetClientSeedResponse
    • RotateServerSeedResponse
    • VerifyResultRequest
    • VerifyResultResponse
    • GetServerSeedResponse
    • GetStatusResponse
    • JoinRoundResponse
    • PlaceMultiPlayerBetRequest
    • PlaceBetResponse
    • RoundResultResponse
    • SuccessResponse
    • ErrorResponse
  1. Provably Fair

Get Revealed Server Seed

GET
/gapi/v1/c/g/{gameCode}/provably-fair/server-seed
Returns the plaintext of an already revealed server seed by its hash. FE calls it to fetch the seed needed for POST /provably-fair/verify-result.
Auth: Player session — Authorization: Bearer {token}
Rate limit: 300 requests per 60 s per IP (GAME_GET_SERVER_SEED)
Games: THAI-HILO, LOTTO
Rules
THAI-HILO: only seeds this player has rotated out are returned (oldServerSeedHash from rotate); the active seed never is. Anything else answers 404 99904.
LOTTO: pass a settled round's seedHash; returns that round's revealed seed (MULTI: the 6-part underscore text; MULTI_CSEED: the bare-hex room seed). An unknown or not-yet-revealed round answers 404 99941.
LOTTO lookups are not limited to the player's own rounds.
Not-found codes differ per game: THAI-HILO 99904, LOTTO 99941.
Demo and real play are separate: a hash seen in demo is not found from a real session, and vice versa.
serverSeedHash must match exactly (lower-case hex).
LOTTO: a hash that belongs to a THAI-HILO multiplayer round answers 500 99912.
Flow
1.
Validates the token, checks system maintenance and resolves gameCode.
2.
Rejects an empty serverSeedHash.
3.
THAI-HILO: looks the hash up among the seeds this player has rotated out for this game.
4.
LOTTO: looks up a revealed multiplayer round with this seed hash.
5.
Returns serverSeed.

Request

Path Params

Query Params

Header Params

Responses

🟢200OK
application/json
Bodyapplication/json

🟠400Bad Request
🟠401Unauthorized
🟠404Not Found
🟠429Too Many Requests
🔴500Internal Server Error
🔴503Service Unavailable
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://dev-api.ambfairgame.com/gapi/v1/gapi/v1/c/g/THAI-HILO/provably-fair/server-seed?serverSeedHash=cecfc34e5de06b8028c4cadba0675e8afc6c4f4bf531327c5697c6f3cfa943c0' \
--header 'Authorization: Bearer 3f9a1c7e5b2d4f6081a3c5e7f9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5b7' \
--header 'Accept-Language: th'
Response Response Example
200 - THAI-HILO
Seed rotated out earlier by this player.
{
    "code": "0",
    "description": "Success.",
    "traceID": "0f8e2c1a-6b3d-4e5f-9a7b-1c2d3e4f5a6b",
    "data": {
        "serverSeed": "a3f1c9e27b4d8f60152e9c7a4b3d2f1e0c9b8a7f6e5d4c3b2a19087f6e5d4c3b"
    }
}
Modified at 2026-09-30 13:23:45
Previous
Verify Result
Next
Check Session
Built with