Generate Game Play Token

Get Game Launch/Play Session Token

🧠 How it works - Summary

  1. 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)

  2. You build the Game Launch URL using the play_token like 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.

  3. 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.

  1. See Passing data to our API Endpoints if you're not yet familiar with how to send JSON data to our REST API URL.

  2. Use command=getGameUrl and pass the data from the table below.

  3. 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.

  4. 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:

Parameter

Mandatory

Description

Accepted values

*command

Must have value 'getGameUrl'

(string) getGameUrl

*environment

“staging” or “production”. Default: production.

(string) staging or production

*mode

“real” or “fun”

(string) realor fun

*game

The unique ID of the game in the RGS-CWS system (see Get List Of Available Games)

(integer) EG:5302

*login

Valid username (6–100 alphanum chars). Must NOT start with number;

NOTE: login is NOT case sensitive meaning that HEROPLAYER is the same as heroplayer

(string) EG:"bigjoe789"

*expiry_date

Token expiration in Y-m-d H:i:s format; Timezone=GMT (max 60 mins)

(string) EG: "2026-12-25 19:55:07"

*currency

Session currency (e.g., USD, GBP, POINT, GC, SC, DOGE, BTC, USDT, etc.). For list of all 3 digit iso codes, click here . If you need more currencies, please contact us.

(string) EG: "DOGE"

*pass

User password for this API (min 6 chars, can be hashed); You can pass any value, but do not omit passing it and neither change it. NOTE: pass is NOT case sensitive meaning that HEROPLAYER is the same as heroplayer.
NOTE: Changing this will cause access restricted, so you must never change it.

(string) EG:"j1g3g1ywRR"

*apiusername

API Username

(string)

*apipass

API Password

(string)

⚠️OPTIONAL! The following parameters are optional:

Parameter

Mandatory

Description

Accepted values

lang

Optional. Language (ISO Code); For Social Casino, send en-sc
NOTE: Supported languages are listed at the end of this document

(string) EG: en, en-sc

rg

Optional. Responsible Gaming popup interval, in minutes. Set to 0 or 999999 to disable

(integer) EG: 60

hidemenu

Optional. 1 = hide the top menu UI (Home,History,Recent Games, Rules,etc.) that usually appears on top left or top right of the game page

(integer) EG:1

paytable_version

Optional. Changes the game RTP. Only works for Slot Games.
RTP available:
highest=98%,
high=94%,
medium=90%,
low=85%,
lowest=80%

(string) highest or high or medium or low or lowest

buyfeature_disable

Optional. Set this to 1 to hide the BUY FEATURE buttons from the games and to disable this function. Setting this to 1, will disable and suppress any other config done via admin panel/database for Buy Feature Availability. Any other value than 1 will be ignored and it will cause the game to use the default system settings, defined in the admin panel.

(int) EG:1

jackpot_disable

Optional. Set this to 1 to DISABLE the jackpots from being won. The jackpots will still appear in the game when value is 1, but cannot be won. Setting this to 1, will disable and suppress any other config done via admin panel/database for Jackpot availability. Any other value than 1 will be ignored and it will cause the game to use the default system settings, defined in the admin panel.

(int) EG:1

max_win_cap

Optional. Affects game’s max exposure, no matter the bet value.

If this value is greater than 0, then the maximum win from any single game round is going to be capped to this value and the exceeding amount will be voided.
EG: If according to the game rules, the player should win 25000$, but the maximum win allowed is set to 10000$, then the player will receive only 10000$. He will receive a message: Congratulations, you have reached the maximum win limit!
This information will also be displayed in the game rules, if this value is >0!

Set to 0 to disable

Progressive Jackpot Wins are not affected by this feature.


Alternatively, the Maximum Win Allowed can also be controlled by adjusting/lowering the Max Bet in each game - for more information on doing this, please contact the developer for support!

(float as string) EG:"5000.00"

totalwon

Optional. The starting value for the user’s total daily won amount (max 4 decimals). Used for tracking daily session winnings limit. EG: if this amount + future wins exceed the platform limits, the player cannot play anymore.

(float as string) EG:"812.22"

extradata

Optional. Extra data required by some API commands. Ignore for this command.

(string)

custom_data

Optional . This value is resent with each request passed to your getbalance/balance_adj endpoints, in parameter custom_data

(string) EG:
raniowgragv2i4y2qqq

exit_url

Optional . Full https:// URL for game exit (when user clicks EXIT or HOME)

(string) EG: https://myweb.com/lobby

token_expire_url

Optional . Full https:// URL for expired token (when user opens a game with expired token)

(string) EG: https://myweb.com/game5203

force_min_bet

Optional . Min allowed bet value (e.g., 0.01)

(float as string) EG:"0.50"

force_max_bet

Optional . Max allowed bet value (e.g., 10000.00)

(float as string) EG:"100.00"

account_email

Optional . Defaults to {login}@{yourdomain.com}

(string)

account_name

Optional . Defaults to login

(string)

account_dob

Optional . Defaults to 1980-01-01

(string)

account_gender

Optional

(string)

account_street

Optional

(string)

account_city

Optional

(string)

account_country

Optional

(string)

account_mobiletel

Optional

(string)

account_secans

Optional . Auto-generates if missing

(string)

show_lobby

Optional . Send as 1 to activate. Show themed lobby. This will return our game lobby HTML code so you can embed the entire lobby;

(integer)

games_categories

Optional. Comma-separated categories (e.g., slot,table)

slotor tableor cardor scratchor arcadeor racingor videopoker(string)

getbalance_url

Optional . Overwrites the webhook URL for getbalance. Must be a valid URL with https:// .Only works if the CWS Provider enabled this. Cannot be enabled in trial.

(string) EG: https://www.myweb.com/getbalance

balance_adj_url

Optional . Overwrites the webhook URL for balance adjustments (balance_adj_url). Must be a valid URL with https:// .Only works if the CWS Provider enabled this. Cannot be enabled in trial.

(string) EG: https://www.myweb.com/balance_adj

📜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"}
Example
curl -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.

RGS-CWS API Response

(located in “message” parameter)

MessageDescription

INVALID LOGIN

Login has invalid characters

PASS SHORT

Password is too short (min 6 chars)

EXISTS

Username already exists

OK

Success. Contains id of the player

🗺️Supported languages

Language code (sent in lang parameter)

Description

en

English

en-sc

English Social (for Social/Sweepstakes)