+31 (0) 20 760 2040 info@spilgames.com

API load

Tutorial: Loading the API

This tutorial will walk you through the steps to include and load the HTML5 API.

Include the API

Include the HTML5 API (game.js) in the of your HTML game file. Typically the index.html.

After loading the game.js file, ensure you initialise with your App ID setup. The “id” you see below is specific to your game, ensure to replace it with the App ID you receive from Spil Games. You can then fully initialise the API using the LoadAPI function as seen below.


After updating your HTML file, see if it works in the Google Chrome Console (more on using Chrome console log.)

Now that we have the HTML5 API integrated and loaded we can start implementing the different features!

Next steps: