#
Games API
This section describes the structure of the Game API provided by DeBets and it is directed to game providers that are listing their games in DeBets website.
The Game API are simple REST JSON Http API that allow you do to the following things:
- create games and edit their configuration
- edit game tags and assign tags to games
- edit game types
- edit the configuration of your account
#
Request format
The base URL of the API is the following:
https://api.debets.io/api/admin
From now on we will only show the relative URL of all API endpoints. The base URL above must be prepended to the relative URL in order to the the full URL.
When using DeBets staging environment simply add -test to the subdomain as usual:
https://api-test.debets.io/api/admin
All parameters are sent as querystring. The following types are used in this documentation:
integer
string
number
boolean
integerlist
stringlist
numberlist
The value of each parameter type is directly parsed from the querystring and produces and error in case the value that is given cannot be parsed into the expected format.
#
Response format
Succesfull requests return an object with a response property whose value contains the result of the actual API call:
{
"response": [
{
"id": "326",
"config": {
"name": "20 Hot Fruit Delights",
"provablyFair": false,
"verified": true
},
"createdAt": 1727457398
}
]
}
Failing requests return an object with an error property containing the error message:
{
"error": "not authorized"
}
#
Authentication mechanism
All requests need to be authenticated. You have the following options:
- you use HTTP headers to provide credentials on every request
- you use the login API to obtain a session cookie
#
Header based per-request authentication
You use the credentials that DeBets has provided you after the enrollment (the same username/password that you use to access the Backoffice) to add the following HTTP headers to your requests: debets-user, debets-password.
curl -H "debets-user: myUser" -H "debets-password: myPassword" 'https://api.debets.io/api/admin/providers/games/list?id=3
#
Login based authentication
To login use the following API:
/auth/login?user=myUser&password=myPassword
When successful it will return a response like the following:
{
"response": {
"id": "S014a84cf5",
"userId": 2,
"userType": "provider",
"username": "myUsername",
"created": 1729193931
}
}
The HTTP response will contain a set-cookie
header. You will then have to provide this cookie in your API calls for them to be authenticated.
Use the following API to logout, providing the cookie
as for the other API calls:
/auth/logout
#
Games management API
#
Add a game
Adds a new game to DeBets. The game must exist in your game server with the ID that you provide
#
Remove a game
Removes a previosuly added game from DeBets
#
List games
Returns the list of your games in DeBets
#
Edit the game configuration
Changes the configuration settings of a game
This example request sets the name and type of the game:
/providers/games/config?gameId=374&type=pixi_slot&name=Lucky 777
#
Upload the image for the game launch button
Uploads an image that the DeBets website will use for the launch button of the game in your games list
The file must be uploaded as multipart/form-data.
#
Remove the image for the game launch button
Removes the image used for the launch button of a game
#
Game tags API
#
Add a tag
Adds a new tag
#
Remove a tag
Removes a previously added tag
#
List tags
Returns the list of existing tags
#
List games with tags
Returns the list of existing tags
The following requests returns all games that have one of Buy Bonus and Megaways tags:
/providers/games/tags/list?tags=Buy Bonus,Megaways&match=any
#
List the tags of a game
Returns the list of tags associated to a game
#
Add tag to game
Adds the tag to the game
#
Remove tag from game
Removes the tag from the game
#
Set tags for game
Set the tags for the game
#
Add tag to preferred tags
Adds the tag to the list of preferred ones
Plese note that only the first two tags in the list of preferred tags are used by DeBets as labels for the game launch buttons (see Game tags)
#
Remove tag from preferred tags
Removes the tag from the list of preferred ones
#
List preferred tags
Returns the list of preferred tags