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
Obtain a sessionID - The
sessionIDis issued by the operator platform when a player launches a game. Your frontend receives it as a query parameter.Determine the RGS URL - The frontend must read the
rgs_urlquery parameter to determine which RGS server to call. Do not hardcode the server address.Call
/wallet/authenticate- Send a POST request with thesessionID:
{
"sessionID": "xxxxxxx"
} - 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:
| Endpoint | Purpose |
|---|---|
POST /wallet/play | Start a round and debit the bet |
POST /wallet/end-round | Complete a round and trigger payout |
POST /wallet/balance | Retrieve current balance |
POST /bet/event | Track 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.
/wallet/authenticateRequest
POST /wallet/authenticate HTTP/1.1 Host: rgs.stake-engine.com Content-Type: application/json
Parameters