Authentication
Har request me ye headers bhejein:
X-UID: UID_XXXXXXXX X-API-KEY: gpk_xxxxx X-API-SECRET: gps_xxxxx Origin: https://your-whitelisted-domain.com (recommended)
REST API. Authentication via headers. JSON request/response.
Har request me ye headers bhejein:
X-UID: UID_XXXXXXXX X-API-KEY: gpk_xxxxx X-API-SECRET: gps_xxxxx Origin: https://your-whitelisted-domain.com (recommended)
Fetch available games with image and metadata.
Create a player on your platform.
Read wallet balance for a player.
Credit or debit balance from your system.
Generate a launch URL for a specific game.
Receive win and bet callbacks from the provider.
<?php
$uid = 'UID_XXXXXXXX';
$apiKey = 'your_api_key';
$apiSecret = 'your_api_secret';
$ch = curl_init('https://api.example.com/api/v1/game/list');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-UID: ' . $uid,
'X-API-KEY: ' . $apiKey,
'X-API-SECRET: ' . $apiSecret,
]);
$response = curl_exec($ch);
$data = json_decode($response, true);
foreach ($data['data']['games'] as $game) {
echo $game['game_name'] . PHP_EOL;
}
<?php
$payload = json_encode([
'player_id' => 'player-1001',
'type' => 'credit',
'amount' => 500,
'transaction_id' => 'txn_5001',
'note' => 'Manual topup',
]);
$ch = curl_init('https://api.example.com/api/v1/user/update_balance');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'X-UID: UID_XXXXXXXX',
'X-API-KEY: your_api_key',
'X-API-SECRET: your_api_secret',
]);