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
| Header | Mandatory | Description |
|---|---|---|
| Authorization | Yes | Authentication token provided by Klas Gaming. |
| Content-Type | Yes | Must be application/json. |
Request Body Parameters
Top-Level Parameters
| Parameter | Mandatory | Description |
|---|---|---|
| external_player_id | Yes | Unique player identifier, assigned by the operator system. |
| game_code | Yes | Unique reference to a specific game, provided by Klas Gaming. |
| language | Yes | Language code for the game interface (ISO 639-1, e.g., TR, EN). |
| currency | Yes | Player currency according to ISO-4217 (e.g., TRY, EUR, USD). |
| player_data | Yes | Object containing detailed player information. |
Player Data Object
| Parameter | Mandatory | Description |
|---|---|---|
| username | Yes | Player screen name. |
| first_name | Yes | Player's first name. |
| last_name | Yes | Player's last name. |
| Yes | Player's email address. | |
| phone | Yes | Player's phone number (with country code). |
| country_code | Yes | Country code (ISO 3166-1 alpha-2, e.g., TR). |
| ip | Yes | Player's IP address. |
| timezone | Yes | Player's timezone (e.g., Europe/Istanbul). |
| language | Yes | Language code (ISO 639-1, e.g., TR). |
| currency | Yes | Currency 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=...¤cy_code=...&language=..."
}
Implementation Notes
- All mandatory parameters must be provided in the request body.
- The
Authorizationheader must contain a valid authentication token. - The
player_dataobject 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_idshould be unique per player and consistent across all API calls. - For further details on parameter usage, refer to the Klas Gaming documentation.