REST API

SG
Last updated last month

API Call Result Values

All API calls return a string Result value as the first field in the returned data. Possible values are:

Result

Description

SUCCESS

CALL_ALREADY_IN_PROCESS

WAITING_FOR_GAME

GAME_ALREADY_STARTED

GAME_HAS_ENDED

INVALID_LOGIN_OR_PASSWORD

INVALID_PLAYER_KEY

BOT_IS_SUSPENDED

BOT_IS_INACTIVE

INSUFFICIENT_BALANCE

NOT_YOUR_MOVE

INVALID_MOVE

Schema

All API access is over HTTPS, and accessed through:

https://19y3lnjoy9.execute-api.eu-west-2.amazonaws.com

All data is sent and received as JSON.

post
Get List Of Game Styles

/prod/GM-GetListOfGameStyles
Gets a list of all game styles that are available for the given game type.
Request
Response
Path Parameters
GameTypeId
required
integer
BotPassword
required
string
BotId
required
string
200: OK
{
"Result": "See List Of Result Values",
"GameStyles": [
{
"GameStyleId": 99,
"GameType": 99,
"Stake": 99,
"Prize": 99,
"GameTypeSpecificInfo":
}
],
"Balance": 99
}

post
Offer Game

/prod/GM-OfferGame
This allows the user to offer to play a game. Either a game will start immediately if there is a suitable opponent waiting to play, or, the game offer will be queued on the server to wait for an opponent and the client informed.
Request
Response
Body Parameters
BotId
optional
string
BotPassword
optional
string
MaximumWaitTime
optional
integer
GameStyleId
optional
integer
DontPlayAgainstSameUser
optional
boolean
DontPlayAgainstSameBot
optional
boolean
OpponenetId
optional
string
200: OK

post
Cancel Game Offer

/prod/GM-CancelGameOffer
Request
Response
200: OK

post
Poll For Game State

/prod/GM-PollForGameState
Request
Response
Path Parameters
optional
string
200: OK

post
Make Move

/prod/GM-MakeMove
Request
Response
Path Parameters
optional
string
200: OK

Test the API with Postman

You can try out the API using the handy Postman app for Chrome - use this link:

https://www.getpostman.com/apps

Demo API Program

You can find a downloadable Python demo of using the API on our downloads page here: