Developer Documentation
Everything you need to integrate our games into your platform. Our RESTful API follows OpenAPI 3.0 specification with comprehensive examples in multiple languages.
Authentication
API key management, JWT tokens, and request signing.
Game Launch
Launch game sessions and manage iframe embedding.
Wallet API
Real-time wallet callbacks for bet and win transactions.
Webhooks
Event notifications for round completions, jackpots, and more.
Reporting API
GGR reports, player activity, and game performance data.
Responsible Gaming
Session limits, reality checks, and self-exclusion APIs.
Authentication
API Key Authentication
All API requests must include your API key in the Authorization header. You will receive separate keys for sandbox and production environments upon registration.
Authorization: Bearer sf_live_your_api_key_here
Content-Type: application/json
X-Request-ID: unique-request-id-for-idempotencySecurity Note: Never expose your API keys in client-side code. All API calls must be made from your backend server. Rotate your keys immediately if you suspect they have been compromised.
Quick Start
Install the SDK
# Node.js
$ npm install @slotforge/sdk
# Python
$ pip install slotforge-sdk
# PHP
$ composer require slotforge/sdkInitialize the Client
import { SlotForge } from '@slotforge/sdk';
const client = new SlotForge({
apiKey: process.env.SLOTFORGE_API_KEY,
environment: 'sandbox',
walletUrl: 'https://your-api.com/wallet'
});Launch a Game Session
// Launch a game session for a player
const session = await client.games.launch({
gameId: 'pharaohs-fortune-megaways',
playerId: 'player_12345',
currency: 'EUR',
language: 'en',
returnUrl: 'https://casino.com/lobby'
});
// Embed in iframe
console.log(session.gameUrl);
// => https://games.slotforge.io/play/abc123...Implement Wallet Callback
// Your wallet endpoint receives bet/win callbacks
app.post('/wallet/callback', async (req, res) => {
const { action, playerId, amount, roundId } = req.body;
if (action === 'bet') {
const balance = await debitPlayer(playerId, amount);
return res.json({ balance });
}
if (action === 'win') {
const balance = await creditPlayer(playerId, amount);
return res.json({ balance });
}
});