HTML5 SDK
This section describes the Jest HTML5 SDK and how to integrate it into your web-based game.
SDK initialization
-
Open your game's
index.htmlfile in your favorite code editor. -
Add the Jest platform script before the closing
</head>tag:<script src="https://cdn.jest.com/sdk/latest/jestsdk.js"></script> -
Initialize the Jest SDK before calling any other SDK methods.
// Initialize JestJestSDK.init().then(() => {// initialized});or using
async/await:// Initialize Jestawait JestSDK.init();
Init options
JestSDK.init() accepts an optional configuration object:
| Option | Type | Default | Description |
|---|---|---|---|
autoLoginReminders | boolean | true | When 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.