API Methods
Get Game

getGame Method

The getGame method opens a real-money game session and returns a game launch URL that should be served directly to the player.

Before calling this method, you should always invoke the createPlayer method to ensure the player exists in the Slotsgateway system.

When specifying the game, you must always use the id_hash value returned by the getGameList method.

To open a demo (fun-play) session, use the getGameDemo method instead.


Method Request

{
  "api_login": "d13b1ceb-6209-4163-b1cf-f304c28b81ec",
  "api_password": "dqRin2nfLosij2n88",
  "method": "getGame",
  "lang": "en",
  "user_username": "yourPlayerId9959",
  "user_password": "superSecretPlayerPassword",
  "gameid": "onlyplay/SaintBananas",
  "homeurl": "https://url.to.your.page.com",
  "cashierurl": "https://url.to.cashier.page.com",
  "play_for_fun": 0,
  "currency": "USD"
}

Successful Response

The response contains a game launch URL and a unique session ID.
The URL should be opened in an iframe or a new browser window.

{
  "error": 0,
  "response": "https://client-mga.slotsgateway.com/i?play=aHR0cHM6Ly9jbGllbnQtbWdhLnNwaW5zaGllbGQubmV0L3BsYXkvOGI1NGVkZjRmMWQ0YzNlZmRhZmQ5MGU1ZmQ5MmM5OWQvMzcxOTgyMy9zb2Z0c3dpc3MvRGljZUJvbmFuemE=",
  "session_id": "8b54edf4f1d4c3efdafd90e5fd92c99d"
}

Error Response

This error is returned when the provided gameid does not exist or is invalid.

{
  "error": 1,
  "message": "Game with this gameid does not exist"
}