Generate Game Play Token
Get Game Launch/Play Session Token
🧠 How it works - Summary
You generate a session token using
command=getGameUrl, by sending your json_request via HTTP POST BODY, to our REST API URL (do not pass this by mistake to the Game Launch API URL)You build the Game Launch URL using the
play_tokenlike indicated below
EG:https://www.cryptoclub.casino/wwwmisc/API/play_url.php?play_token=ax4sH24aw4123astyy537sdys
Make sure to replace the URL with your Games Launch API URL provided with the setup settings.You can embed the URL in your website using an iFrame (recommended) or launch this in a new tab (not recommended)
🪜Step by step guide
This method relies on sending a set of parameters that will generate a session play token, to our RGS-CWS API.
See Passing data to our API Endpoints if you're not yet familiar with how to send JSON data to our REST API URL.
Use command=getGameUrl and pass the data from the table below.
You should receive the play_token in the response.
You must then attach the play_token value to your launch game URL, like this:
{Games Launch API URL}?play_token=….EG:https://www.cryptoclub.casino/wwwmisc/API/play_url.php?play_token=ax4sH24aw4123astyy537sdys
Please make sure to use the correct URLs given to you by CWS Support. You must replace the URL above with your Games Launch API URL provided with the setup settings.Once you are able to obtain the play_token, see the Game Launch documentation section
The following parameters, marked with *, need to be included in the request:
⚠️OPTIONAL! The following parameters are optional:
📜Sample JSON request
(what you send - contains only mandatory data):
{"command": "getGameUrl", "environment": "production", "mode": "real", "game": 6857, "currency": "USD", "login": "demotest", "pass": "123456", "expiry_date": "2027-07-02 14:00:00"}Examplecurl -X POST https://YOUR_API_URL \
-H "Content-Type: application/json" \
-d '{
"command": "getGameUrl",
"mode": "real",
"environment": "production",
"game": 6857,
"currency": "USD",
"login": "demotest",
"pass": "123456",
"expiry_date": "2027-07-02 14:00:00"
"apiusername": "yourUsername",
"apipass": "yourPassword"
}'📃Sample JSON response
(what the RGS-CWS API will respond)
{"message":"OK","play_token":"7x8qg5890qgw5yq8g5qwaseesSS"}
Please note that the play_token is case sensitive!
You can reuse game sessions play tokens for the same login+game, but validate their expiry date (they expire in a maximum of 60 minutes from the date when they were generated);
Possible error messages.