Introduction

Forge has two APIs that allow our partners to run quests on our platform that reward players for their in-game activity.

  • One API for recording a player’s game time
  • Another one is for recording a player’s achievements in the game

Here are the in-game quests that are possible:

  • Play the game for N hours
  • Play the game for N days in a week
  • Play the game for N days in a row
  • Unlock a specific achievement in the game
  • Unlock N achievements in the game

Mapping “Partner game User with Forge Users”

Both the APIs accept either of the below as the unique identifier to map the “partner users” data with the corresponding “forge users”:

  • Email ID
  • Blockchain + Wallet Address

If a corresponding user is not present in “Forge,” the data will be archived immediately. It will be later used when a user joins Forge with an “Email ID”/”Blockchain + Wallet Address“ we have data already for or an existing Forge user who connects a new “Blockchain + Wallet Address” to forge for which we have data in the archive.

API Documentation

There are two APIs we support, one for playtime recording and another one for achievements:

One API to fetch user progress for each campaign.

API key

To access the Forge APIs, you will need an API key. Please reach out to the forge team directly to get an API key, as the “Key” creation process is currently manual.

Forge generates a unique API key for each partner integrating with our system. This key is used to identify the partner, game, and game_id. Also, there is a limit to how many requests one can make to our endpoint using an API Key. The current limit is set at 500K per day. It’s more of a soft/safety limit. If a game partner needs a higher limit, we can increase it.

The API Key format: it is a base64 encoding of

<partner-name>:<game-name>:<game-id>:<secret random-value of size 12 characters>

Example: Game1

FieldValue
partner-namegame1
game-namegame1
game-idgame1-01
random secretcHq12EXeuZvP

The key will be like below.

cGl4ZWw6cGl4ZWw6cGl4ZWwtMDE6Y0hxMTJFWGV1WnZQ