How do I authenticate with the RGS?

Authentication is performed by calling POST /wallet/authenticate with a valid sessionID. This must be the first API call before any other wallet endpoints can be used.

Authentication flow

  1. Obtain a sessionID - The sessionID is issued by the operator platform when a player launches a game. Your frontend receives it as a query parameter.

  2. Determine the RGS URL - The frontend must read the rgs_url query parameter to determine which RGS server to call. Do not hardcode the server address.

  3. Call /wallet/authenticate - Send a POST request with the sessionID:

{
  "sessionID": "xxxxxxx"
}
  1. Handle the response - A successful authentication returns the player’s balance, game configuration, and any active round:
{
  "balance": {
    "amount": 100000,
    "currency": "USD"
  },
  "config": {
    "minBet": 100000,
    "maxBet": 1000000000,
    "stepBet": 100000,
    "defaultBetLevel": 1000000,
    "betLevels": [],
    "jurisdiction": {
      "socialCasino": false,
      "disabledFullscreen": false,
      "disabledTurbo": false
    }
  },
  "round": {}
}

What you get from authentication

  • Balance - The player’s current balance in minor currency units.
  • Config - Bet levels (min, max, step, defaults) and jurisdiction settings such as social casino mode, fullscreen restrictions, and turbo restrictions.
  • Round - If the player has an active (incomplete) round, it is returned here. The frontend should resume it rather than starting a new one.

After authentication

All subsequent API calls require the same sessionID:

EndpointPurpose
POST /wallet/playStart a round and debit the bet
POST /wallet/end-roundComplete a round and trigger payout
POST /wallet/balanceRetrieve current balance
POST /bet/eventTrack in-progress player actions

You can call /wallet/authenticate multiple times with the same sessionID without any issues. Re-authenticating will simply return the current balance and session state - it will not create a duplicate session or reset the active round.

Common error

Calling any wallet endpoint without authenticating first returns ERR_IS (Invalid Session). Always authenticate before making other API calls.

For full endpoint details, see the API documentation.

POST /wallet/authenticate

Request

POST /wallet/authenticate HTTP/1.1
Host: rgs.stake-engine.com
Content-Type: application/json

Parameters