Skip to content

Getting Started

The Innovade SDK provides a unified interface for frontend applications to interact with our Casino Platform backend. It handles API key injection, session management, and token refreshes automatically.

Installation

Install the SDK via NPM or Yarn:

bash
npm install @innovassion/innovade-sdk
# or
yarn add @innovassion/innovade-sdk

Initialization

Import the SDK into your application's root file and initialize it with your Platform API Key and target environment.

javascript
import { PlatformSDK } from '@innovassion/innovade-sdk';

const sdk = new PlatformSDK({
  apiKey: 'your-platform-api-key', // Provided by your operator backoffice
  environment: 'production' // 'production' | 'staging'
});

Environments

  • production: Connects to the live casino backend.
  • staging: Connects to the staging environment for QA testing.

Framework Integration

Because the SDK handles its own state, you should initialize it once and make it available to your components.

React Example (Context API):

javascript
import { createContext, useContext } from 'react';
import { PlatformSDK } from '@innovassion/innovade-sdk';

const sdk = new PlatformSDK({ apiKey: 'xxx', environment: 'staging' });
const SdkContext = createContext(sdk);

export const useSdk = () => useContext(SdkContext);