Skip to content

Configuration

Simón Olivo (Sarturo) edited this page Jul 23, 2020 · 3 revisions

This page describes all the variables and functions that you can use to set up the GameJolt API in your game.

Variables:

GAME_API : String

The base URL of the Gamejolt API: api.gamejolt.com/api/game/v1_2

GAME_ID : String

The Game ID of your game. You can find it on Game Jolt: Game Page > Manage Game > Game API > API Settings.

PRIVATE_KEY : String

The Private Key of your game. You can find it on Game Jolt: Game Page > Manage Game > Game API > API Settings.

username : String

This variable will store the Game Jolt username of the player.

user_token : String

This variable will store the Game Token of the player. For more information about the Game Token, check the Game Jolt website.

Functions:

set_game_credentials( params: Dictionary) -> void

Set up the Game API settings. This function must be called first.

Parameters

  • "game_id": String. The Game ID of your game.
  • "game_token": String. The Private Key of your game.

get_user_credentials() -> void

Automatically sets up the username and game token of the current player. This function only works for HTML5 games.