Get Game Config
GET /v1/games/:gameType/configReturns the full configuration for a specific game type, including reward segments, weights, and display settings.
Authentication
Section titled “Authentication”| Header | Required | Value |
|---|---|---|
X-API-Key | Yes | Your public key |
Path Parameters
Section titled “Path Parameters”| Param | Type | Description |
|---|---|---|
gameType | string | One of NEON_WHEEL, COSMIC_SLOTS, ENIGMA_BOXES |
Request Examples
Section titled “Request Examples”curl -X GET https://api.gamifyhost.com/v1/games/NEON_WHEEL/config \ -H "X-API-Key: pk_live_your_public_key"const gameType = 'NEON_WHEEL';
const response = await fetch( `https://api.gamifyhost.com/v1/games/${gameType}/config`, { method: 'GET', headers: { 'X-API-Key': 'pk_live_your_public_key', }, });
const data = await response.json();console.log(data.data.config);import requests
game_type = "NEON_WHEEL"
response = requests.get( f"https://api.gamifyhost.com/v1/games/{game_type}/config", headers={"X-API-Key": "pk_live_your_public_key"},)
data = response.json()print(data["data"]["config"])import java.net.http.HttpClient;import java.net.http.HttpRequest;import java.net.http.HttpResponse;import java.net.URI;
String gameType = "NEON_WHEEL";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder() .uri(URI.create( "https://api.gamifyhost.com/v1/games/" + gameType + "/config" )) .header("X-API-Key", "pk_live_your_public_key") .GET() .build();
HttpResponse<String> response = client.send( request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());gameType := "NEON_WHEEL"url := fmt.Sprintf( "https://api.gamifyhost.com/v1/games/%s/config", gameType,)
req, _ := http.NewRequest("GET", url, nil)req.Header.Set("X-API-Key", "pk_live_your_public_key")
resp, err := http.DefaultClient.Do(req)if err != nil { log.Fatal(err)}defer resp.Body.Close()
var result map[string]interface{}json.NewDecoder(resp.Body).Decode(&result)fmt.Println(result["data"])$gameType = 'NEON_WHEEL';
$ch = curl_init( "https://api.gamifyhost.com/v1/games/{$gameType}/config");curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ 'X-API-Key: pk_live_your_public_key', ],]);
$response = curl_exec($ch);curl_close($ch);
$data = json_decode($response, true);print_r($data['data']['config']);require 'net/http'require 'json'
game_type = 'NEON_WHEEL'
uri = URI( "https://api.gamifyhost.com/v1/games/#{game_type}/config")req = Net::HTTP::Get.new(uri)req['X-API-Key'] = 'pk_live_your_public_key'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http| http.request(req)enddata = JSON.parse(res.body)puts data['data']['config']using var client = new HttpClient();client.DefaultRequestHeaders.Add( "X-API-Key", "pk_live_your_public_key");
var gameType = "NEON_WHEEL";var response = await client.GetAsync( $"https://api.gamifyhost.com/v1/games/{gameType}/config");var json = await response.Content.ReadAsStringAsync();Console.WriteLine(json);import 'dart:convert';import 'package:http/http.dart' as http;
const gameType = 'NEON_WHEEL';
final response = await http.get( Uri.parse( 'https://api.gamifyhost.com/v1/games/$gameType/config', ), headers: {'X-API-Key': 'pk_live_your_public_key'},);
final data = jsonDecode(response.body);print(data['data']['config']);Response
Section titled “Response”Status: 200 OK
{ "message": "Game config retrieved", "code": 200, "status": "success", "data": { "gameType": "NEON_WHEEL", "name": "Neon Wheel", "description": "Spin the neon wheel to win rewards", "pointsToUnlock": 100, "status": "ACTIVE", "config": { "segments": 8, "rewards": [ { "tier": "common", "type": "points", "value": 10, "label": "+10 pts", "weight": 40 }, { "tier": "common", "type": "xp", "value": 25, "label": "+25 XP", "weight": 30 }, { "tier": "rare", "type": "cashback", "value": 50, "label": "$0.50 cashback", "weight": 10 }, { "tier": "epic", "type": "special", "value": 500, "label": "Grand Prize", "weight": 2 } ] } }}Response Fields
Section titled “Response Fields”| Field | Type | Description |
|---|---|---|
gameType | string | Game identifier |
name | string | Display name |
description | string | Short description |
pointsToUnlock | integer | Cost per play |
status | string | Game status |
config | object | Game-specific configuration (segments, reward weights, etc.) |
Errors
Section titled “Errors”| Code | Message |
|---|---|
404 | Game mechanic not found |