RB7 Gaming Platform API

Integrate casino, slots, sports betting, and lottery games into your platform with our comprehensive API.

Introduction

Welcome to the RB7 Gaming Platform API. Our API provides seamless access to multiple game providers including casino games, slot machines, sports betting, and lottery systems.

🎰 Casino Games
Live dealer games from SA Gaming, Dream Game, WM, and more
🎮 Slot Games
Slots from Pragmatic Play, PG Slot, Joker, and 20+ providers
Sports Betting
Sports betting from multiple trusted providers
🎲 Lottery
RB7 Lotto and other lottery games

Authentication

All API requests require JWT (JSON Web Token) authentication. Include your JWT token in the Authorization header of each request.

JWT Token Structure

Your JWT token should contain the following payload:

// Install: composer require firebase/php-jwt

use Firebase\JWT\JWT;

$secretKey = 'YOUR_SECRET_KEY';
$agentId = '1000';
$userId = 1;

$payload = [
    'userId' => $userId,
    'agentId' => $agentId,
    'iat' => time(),
    'exp' => time() + (60 * 60 * 24) // 24 hours
];

$jwt = JWT::encode($payload, $secretKey, 'HS256');

echo $jwt;
// Install: npm install jsonwebtoken

const jwt = require('jsonwebtoken');

const secretKey = 'YOUR_SECRET_KEY';
const agentId = '1000';
const userId = 1;

const payload = {
  userId: userId,
  agentId: agentId,
  iat: Math.floor(Date.now() / 1000),
  exp: Math.floor(Date.now() / 1000) + (60 * 60 * 24) // 24 hours
};

const token = jwt.sign(payload, secretKey);

console.log(token);

🔑 JWT Token Manager

Token will be saved in browser and used for all test requests below

Quick Start

Get started with the RB7 API in just a few steps:

  1. 1 Get Your Credentials Contact your account manager to receive your Agent ID and Secret Key
  2. 2 Generate JWT Token Use the authentication code above to create your JWT token
  3. 3 List Available Games Call the List Games API to see available games from providers
  4. 4 Launch a Game Get the game URL and display it in an iframe or webview

GETList Games

Retrieve a list of available games from a specific game provider. Currently supports Slot type games.

GET /api/game/lists

Get list of games from specified provider

Query Parameters

Parameter Type Required Description
game string Required Game provider code (e.g., 'sa', 'pg', 'pragmatic')

🧪 Try It Out

Example Request

$token = 'YOUR_JWT_TOKEN';
$baseUrl = 'https://game-service-staging.fluskc.com';
$gameProvider = 'pg'; // PG Slot

$ch = curl_init($baseUrl . '/api/game/lists?game=' . $gameProvider);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: ' . $token,
    'Content-Type: application/json'
]);

$response = curl_exec($ch);
$statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($statusCode === 200) {
    $data = json_decode($response, true);
    print_r($data['data']); // Array of games
}
const axios = require('axios');

const token = 'YOUR_JWT_TOKEN';
const baseUrl = 'https://game-service-staging.fluskc.com';
const gameProvider = 'pg'; // PG Slot

try {
  const response = await axios.get(`${baseUrl}/api/game/lists`, {
    params: { game: gameProvider },
    headers: {
      'Authorization': token,
      'Content-Type': 'application/json'
    }
  });

  console.log(response.data.data); // Array of games
} catch (error) {
  console.error('Error:', error.response?.data);
}

Example Response

{
  "statusCode": 200,
  "data": [
    {
      "code": "63d77314c7b4ea8acf592874",
      "name": "Coffee Or Me Bingo",
      "type": "arcade_bingo",
      "active": true,
      "order": 1,
      "imageUrl": "https://download.x-gaming.com/assets/arcade/coffeeormebingo/banner.png"
    }
  ],
  "timestamp": "2022-07-07T15:57:37+00:00"
}

GETLaunch Game

Get the game URL to launch and display the game in an iframe or webview.

GET /api/game/launch

Launch a game and get the playable URL

Query Parameters

Parameter Type Required Description
game string Required Game provider code
gameCode string Optional Specific game code from list games API
isMobile boolean Optional true for mobile, false for desktop
gameType string Optional Game type (Only for kingmaker, jili, fc)

🧪 Try It Out

POSTUpdate User Credit

Update user's wallet balance. This endpoint is typically called by game providers via webhook to update credits after bets, wins, or cancellations.

POST /api/wallet/balance Agent API

Update user credit balance

🧪 Try It Out

GETTransaction Detail

Retrieve detailed information about a specific game transaction including bet amount, win amount, and other transaction-specific data.

GET /api/game/transaction/detail

Get transaction details by transaction ID

🧪 Try It Out

GETList Users

Retrieve a list of all users under your agent account.

GET /api/users Agent API

Get all users

🧪 Try It Out

This endpoint requires no additional parameters.

GETGet User By ID

Retrieve detailed information about a specific user.

GET /api/users/{id} Agent API

Get user by ID

🧪 Try It Out

Error Codes

Common HTTP error codes and their meanings in the RB7 API.

Status Code Error Description Common Causes
200 OK Request successful -
400 Bad Request Invalid request parameters Missing required fields, invalid data format
401 Unauthorized Authentication failed Invalid JWT token, expired token, missing Authorization header
403 Forbidden Access denied Insufficient permissions, IP whitelist restriction
404 Not Found Resource not found Invalid endpoint, user/game/transaction not found
500 Server Error Internal server error Unexpected server issues, contact support

Game Providers

List of supported game providers and their codes.

Casino Games

ae AE Casino
allbet Allbet
sa SA Gaming
dg Dream Game
wm WM Casino
afbcasino AFB Casino
gd88 GD88
evenbet Evenbet

Slot Games

pragmatic Pragmatic Play
pg PG Slot
joker Joker
afbslot AFB Slot
amb-slot AMB Slot
amb-hacksaw AMB Hacksaw
amb-relax AMB Relax
amb-nolimit AMB Nolimit
amb-918kiss AMB 918Kiss
amb-ace333 AMB Ace333
amb-askmeplay AMB Askmeplay
amb-ameba AMB Ameba
amb-slotxo AMB Slotxo
amb-simpleplay AMB Simpleplay
amb-mannaplay AMB Mannaplay
amb-cq9 AMB CQ9
amb-cg AMB Creative gaming
amb-live22 AMB Live22
amb-netent AMB Netent
amb-yggdrasil AMB Yggdrasil
amb-kingmaker AMB Kingmaker
rb7-slot RB7 Slot
spadegaming Spade Gaming
habanero Habanero

Sports Betting

obet OBet
ws WS Sportbook
muay Muay Pakyok
afb AFB1188
amb-sbobet AMB Sbobet
onebx One BX
rb7sportbook RB7 Sportbook