Skip to main content

HTML5 SDK

This section describes the Jest HTML5 SDK and how to integrate it into your web-based game.

SDK initialization

  1. Open your game's index.html file in your favorite code editor.

  2. Add the Jest platform script before the closing </head> tag:

    <script src="https://cdn.jest.com/sdk/latest/jestsdk.js"></script>
  3. Initialize the Jest SDK before calling any other SDK methods.

    // Initialize Jest
    JestSDK.init().then(() => {
    // initialized
    });

    or using async / await:

    // Initialize Jest
    await JestSDK.init();

Init options

JestSDK.init() accepts an optional configuration object:

OptionTypeDefaultDescription
autoLoginRemindersbooleantrueWhen set to false, disables the automatic login reminder popups that appear at escalating intervals for unregistered players. Manual login via JestSDK.login() is unaffected.
// Disable automatic platform login reminders
await JestSDK.init({ autoLoginReminders: false });

Using the SDK

The remainder of this guide walks through the SDK's modules and how to use them in your game.

This includes retrieving player data and authenticating players, passing data into your game, scheduling and managing notifications, and using in-app payments. It also includes sharing your game with referral links and tracking conversions and controlling the platform loading screen.