Operator Games API SDK
The Operator Games API SDK is a JavaScript/TypeScript library that provides operators with a unified integration layer for multiple game suppliers, starting with Turbostars and OneTouch Originals. With this SDK, you can have:
A unified interface by integrating one SDK for multiple game suppliers,
Automatic token validation done with Hub88 backend,
Automatically select the correct supplier based on game code received after a successful token validation,
Integrate games directly without iframes (Shadow Mode),
Configuration management by handling provider-specific configurations seamlessly.
As the SDK runs natively, it avoids iframe limitations, reduces overhead, and provides a smoother, mobile-friendly gaming experience.
Integration Flow
The integration follows a simple two-step process:
Authorisation
The operator backend calls Hub88’s
/game/authorizeendpoint and returns initialisation data to the frontend. See Step 1 for the endpoint details.Hub88 API validates tokens, resolves provider and game configuration, and delivers provider-specific data. See Step 1 for the API call's response.
Operator Games API SDK initialises the correct provider SDK based on the game code prefix (e.g.,
btsg_→ Turbostars). See Step 2 for how to initalise the SDK.Game supplier (provider SDK) is initialised seamlessly in the player’s browser.
Integration Steps
Step 2: Initialise SDK Client (Frontend)
Use the data from the authorisation request's response to initialise the Operator Games API SDK on your frontend.
Installation via CDN
Currently the available version is 1.1.2 with the full CDN URL being https://cdn.hub88.io/games-sdk/hub88-games-sdk-1.1.2.js
Basic Integration Example
Advanced Configuration
This example uses two types of optional parameters for the initialisation.
Optional parameters within the initialisation. These parameters help to customise the experience depending on how you wish the player to experience the gameplay.
Advanced parameters defined in the
metaobject. These parameters are supplier-specific and allow to further update how the game is displayed, including but not limited to, changing the styles, controlling URL routing, updating currencies, and much more.See Turbostars' advanced options in the code sample below (starting from row 12).
SDK Methods and Lifecycle
isInitialized()
Returns true if SDK is ready.
getProvider()
Returns the detected provider (e.g., turbostars).
update(config)
Updates optional configuration (e.g., language, meta).
destroy()
Cleans up resources and terminates the session.
Instance Methods
Multi-Supplier Support
This SDK is built on a multi-supplier architecture, allowing operators to integrate with a wide range of game suppliers through a single SDK. Currently, the SDK supports two game suppliers - Turbostars and OneTouch Originals.
We're adding new suppliers gradually without any need for you to change your integration. This ensures long-term scalability and compatibility as more providers are onboarded.
Turbostars Integration
See how to incorporate Turbostars Sportsbook modules in here.
Games with the prefix btsg_ are automatically recognised and handled by the supplier Turbostars.
Supported Games: CS:GO, Dota 2, LoL, and other esports titles Example: The game_code for Counter-Strike: Global Offensive would be displayed as
game_code: "btsg_csgo"Features: Live betting, pre-match odds, multiple bet types
OneTouch Originals Integration
See how to incorporate OneTouch Originals here.
Games with the prefix orgn_ are automatically recognised and handled by the supplier OneTouch Originals.
Supported Games: dice, plinko, roulette, blackjack, baccarat, hilo. Example:
game_code: "orgn_originalplinko"
Error Handling
Common Error Scenarios
INVALID_TOKEN
Token validation failed
The provided token is invalid, expired, or not recognised by Hub88.
Refresh or reissue the token and reattempt initialisation.
PROVIDER_NOT_FOUND
Game provider not supported
The SDK could not detect or match the game’s provider (e.g., unknown prefix).
Verify the game code and ensure the provider is supported by the SDK.
CONTAINER_NOT_FOUND
Game container missing
The specified DOM container for the game does not exist or cannot be found.
Ensure the container element (e.g. #game-container) is present in the DOM before initialisation.
CONFIG_VALIDATION_FAILED
Invalid configuration
One or more configuration parameters are missing or invalid in the SDK setup.
Check all required parameters (provider_token, provider_pid, launcher_base_url).
UNKNOWN_ERROR (default)
Initialisation failed (generic error)
A non-specific error occurred during SDK setup or communication.
Review logs for details and confirm SDK configuration and network connectivity.
Validation Requirements
The SDK validates these required parameters:
provider_token- Required, alphanumeric string 10–100 characters. Can't be empty or null.provider_pid- Required, non-empty string.launch_base_url- Required, must be a valid URL
Security Considerations
Follow the best practices of Server-Side Authorisation. Always call
/game/authorizefrom your backend, never expose operator credentials to the frontend.Do not expose operator credentials.
Generate fresh tokens for each new session.
Additional links
Learn more about Turbostars Shadow mode and troubleshoot any issues with their API in https://docs.turbostars.gg/#/frontend/about_shadow_mode?id=about-shadow-mode
Last updated
Was this helpful?

