Quick Start Guide
Get your first tournament running and integrate with the Tournament Platform APIs in just a few steps. This guide covers the essential integration points for both Casino System and Game Platform integrations.
Prerequisites
Before you begin, ensure you have:
API Keys : Operator API keys with appropriate permissions
Development Environment : Ability to make HTTP requests to the Tournament Platform
Webhook Endpoint (optional): For receiving real-time tournament events
Production Environment : This guide uses the production Tournament Platform API. Use appropriate testing strategies for your integration.
Step 1: Authentication Setup
Obtain API Keys
Access Operator Dashboard
Log into your Tournament Platform operator dashboard
Create API Key
Navigate to Settings → API Keys → Create New Key
Configure Permissions
Grant these permissions for the quickstart:
tournaments.read
tournaments.write
players.read
players.write
results.read
Copy API Key
Important : Copy the API key secret immediately - it won’t be shown again
Test Authentication
Verify your API key works:
curl -X GET "https://ts.playservices.tech/api/tournaments" \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json"
Expected Response (200 OK):
{
"tournaments" : [],
"pagination" : {
"total" : 0 ,
"limit" : 50 ,
"offset" : 0
},
"meta" : {
"operator_id" : "op_1234567890abcdef" ,
"permissions" : [ "tournaments.read" , "tournaments.write" ]
}
}
Step 2: Create Your First Tournament
Create a tournament that starts at a specific time:
const createTournament = async () => {
// Schedule tournament for 1 hour from now
const startTime = new Date ();
startTime . setHours ( startTime . getHours () + 1 );
const response = await fetch ( 'https://ts.playservices.tech/api/tournaments' , {
method: 'POST' ,
headers: {
'Authorization' : 'Bearer your-api-key' ,
'Content-Type' : 'application/json'
},
body: JSON . stringify ({
name: 'My First Tournament' ,
startTime: startTime . toISOString (),
gameSlug: 'crash-classic' ,
maxPlayers: 50 ,
minPlayers: 5 ,
entryFee: 10.00 ,
prizePool: {
type: 'percentage' ,
distribution: [ 50 , 30 , 20 ]
},
rebuyEnabled: true ,
rebuyFee: 10.00 ,
maxEntriesPerPlayer: 3
})
});
const tournament = await response . json ();
console . log ( 'Tournament created:' , tournament . tournamentId );
return tournament ;
};
Expected Response:
{
"tournamentId" : "12345" ,
"status" : "scheduled" ,
"name" : "My First Tournament" ,
"startTime" : "2024-01-15T21:00:00Z" ,
"gameSlug" : "crash-classic" ,
"maxPlayers" : 50 ,
"currentPlayers" : 0 ,
"entryFee" : 10.00 ,
"registrationOpen" : true
}
Step 3: Register Players
Register a player for your tournament:
const registerPlayer = async ( tournamentId ) => {
const response = await fetch ( `https://ts.playservices.tech/api/tournaments/ ${ tournamentId } /players` , {
method: 'POST' ,
headers: {
'Authorization' : 'Bearer your-api-key' ,
'Content-Type' : 'application/json'
},
body: JSON . stringify ({
userId: 'player_123' ,
displayName: 'TestPlayer' ,
buyInAmount: 10.00
})
});
const registration = await response . json ();
console . log ( 'Player registered:' , registration . playerId );
console . log ( 'Game URL:' , registration . gameUrl );
return registration ;
};
Key Response Fields:
playerId: Tournament-specific player identifier
jwtToken: Authentication token for game access
gameUrl: Direct URL to join tournament game
roomUrl: Game room URL for integration
Step 4: Monitor Tournament Status
Monitor your tournament in real-time:
const checkTournamentStatus = async ( tournamentId ) => {
const response = await fetch ( `https://ts.playservices.tech/api/tournaments/ ${ tournamentId } /status` , {
headers: {
'Authorization' : 'Bearer your-api-key'
}
});
const status = await response . json ();
console . log ( 'Tournament Status:' , status . status );
console . log ( 'Current Players:' , status . currentPlayers );
console . log ( 'Prize Pool:' , status . prizePool . totalAmount );
return status ;
};
Step 5: Access Results
Once your tournament completes, retrieve the results:
const getTournamentResults = async ( tournamentId ) => {
const response = await fetch ( `https://ts.playservices.tech/api/tournaments/ ${ tournamentId } /results` , {
headers: {
'Authorization' : 'Bearer your-api-key'
}
});
const results = await response . json ();
console . log ( 'Winners:' , results . winners );
console . log ( 'Prize Distribution:' , results . prizeDistribution );
return results ;
};
Next Steps
Now that you’ve created your first tournament, explore these advanced topics:
Tournament Types Learn about Scheduled vs Hop-on/Off tournament formats and their differences.
Casino Integration Deep dive into external APIs for complete casino system integration.
Game Platform Integration Explore internal APIs for game system integration and real-time communication.
API Reference Complete API documentation with interactive examples and schemas.
Need Help?
Our support team is available to help with integration questions and technical issues at [email protected]