๐Ÿ”„ 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:


๐Ÿ†• 1. API Version Declaration
  • Contact CWS Support to request access to API Version 2.0.

  • Use version 2.0 during integration and testing.


๐Ÿ” 2. Security Changes
  • Encryption is no longer used. rvar= is no longer needed

  • Instead, security is enforced via:


๐ŸŽŸ๏ธ 3. Token Generation Changes
  • 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.php using the appropriate command.

    • Retrieve a Play Token in the response.

    • Use that token to construct the final Game Launch URL. Full details here


๐Ÿง  4. Game Launch Flow
  • 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 URL play.php


๐Ÿ’ฐ 5. Receiving API Data (getbalance / balance_adj)
  • 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_result field for validation (you must implement hash checking logic)

    • Contain a login field. This will include your operator prefix, e.g., stg_u241_abcxyz

      โžค You must remove the stg_u241_ or u241_ prefix using your operator ID (e.g., 241).

      Normalize the username to match the one originally sent in your request (e.g., abcxyz)


๐Ÿ“ค 6. Sending Data to CWS Endpoints
  • 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).


โฑ๏ธ 7. Timeout Policy
  • The allowed response time for your endpoints is now 5 seconds
    (reduced from 30 seconds in v1.0)


๐Ÿ” 8. Retry Mechanism Update
  • 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.