๐ Upgrading from Casinowebscripts RGS API v1.0 to v2.0
If you're currently using CWS RGS API Version 1.0 and plan to upgrade to Version 2.0, please review the following key changes:
Contact CWS Support to request access to API Version 2.0.
Use version
2.0during integration and testing.
Encryption is no longer used. rvar= is no longer needed
Instead, security is enforced via:
IP whitelisting
Hash validation (
hashed_result).Full details hereapiusernameandapipassword
In API v1.0, tokens were generated by sending data directly to the Game Launch URL:
play.php.In API v2.0:
Send the same data to
restapi.phpusing the appropriatecommand.Retrieve a Play Token in the response.
Use that token to construct the final Game Launch URL. Full details here
Launch games using the Play Token as explained in the v2.0 documentation.
This replaces the older method of launching directly via
play.php. You must not use rvar anymore; just attach the play_token to the Game Launch API URLplay.php
The data you receive from CWS to your endpoints will now:
Be delivered as a raw JSON string in the HTTP body (not as
rvar=...)Include a
hashed_resultfield for validation (you must implement hash checking logic)Contain a
loginfield. This will include your operator prefix, e.g.,stg_u241_abcxyzโค You must remove the
stg_u241_oru241_prefix using your operator ID (e.g.,241).Normalize the username to match the one originally sent in your request (e.g.,
abcxyz)
All API requests must be sent as:
Raw JSON in the body of a HTTP POST request
No longer use
rvar=in the request
All responses will now return raw JSON (no more
rvar=in output).
The allowed response time for your endpoints is now 5 seconds
(reduced from 30 seconds in v1.0)
Retry behavior has been modified:
Bets will be refunded (amount gets reversed and sent as type=cancelbet) after 5 minutes, if your server will timeout
Wins will be re-sent after 5 minutes, if your server will timeout
Each request will be retried until you respond with
"status": "1"or until more than 20 retries are reached.