Skip to main content

Game Launch URL

This document describes how to integrate with casino by generating a Game Launch URL for players using the REST API endpoint.


Endpoint

POST {BASE_URL}/v1/game/launch


Headers

HeaderMandatoryDescription
AuthorizationYesAuthentication token provided by Klas Gaming.
Content-TypeYesMust be application/json.

Request Body Parameters

Top-Level Parameters

ParameterMandatoryDescription
external_player_idYesUnique player identifier, assigned by the operator system.
game_codeYesUnique reference to a specific game, provided by Klas Gaming.
languageYesLanguage code for the game interface (ISO 639-1, e.g., TR, EN).
currencyYesPlayer currency according to ISO-4217 (e.g., TRY, EUR, USD).
player_dataYesObject containing detailed player information.

Player Data Object

ParameterMandatoryDescription
usernameYesPlayer screen name.
first_nameYesPlayer's first name.
last_nameYesPlayer's last name.
emailYesPlayer's email address.
phoneYesPlayer's phone number (with country code).
country_codeYesCountry code (ISO 3166-1 alpha-2, e.g., TR).
ipYesPlayer's IP address.
timezoneYesPlayer's timezone (e.g., Europe/Istanbul).
languageYesLanguage code (ISO 639-1, e.g., TR).
currencyYesCurrency code (ISO-4217, e.g., TRY).

Example Request

curl --location '{BASE_URL}/v1/game/launch' \
--header 'Authorization: *********1ON084OVRHSVBGSENTWmtENFo*********' \
--header 'Content-Type: application/json' \
--data-raw '{
"external_player_id": "61",
"game_code": "DM-J1K2",
"language": "TR",
"currency": "TRY",
"player_data": {
"username": "playerusername",
"first_name": "John",
"last_name": "Doe",
"email": "player@example.com",
"phone": "+905551234567",
"country_code": "TR",
"ip": "1.1.1.1",
"timezone": "Europe/Istanbul",
"language": "TR",
"currency": "TRY"
}
}'

Response

The API will return a launch URL that can be used to redirect the player to the game:

{
"url": "https://<host>/?token=...&player_id=...&game_code=...&currency_code=...&language=..."
}

Implementation Notes

  • All mandatory parameters must be provided in the request body.
  • The Authorization header must contain a valid authentication token.
  • The player_data object contains detailed player information that will be used for game initialization.
  • The response URL can be used to redirect the player to the game interface.

Additional Notes

  • Ensure that all player data fields are accurate and match the player's account information.
  • The external_player_id should be unique per player and consistent across all API calls.
  • For further details on parameter usage, refer to the Klas Gaming documentation.