Welcome to WU24 Tivoli API platform!

This documentation is for teams who want to integrate their mini-games into the Tivoli system. Once your game is connected, users will be able to launch it from Tivoli and send gameplay data (like wins) securely back to our backend.

Requirements Before You Start

Before you can connect your game:

  1. You must request an API Key from the Tivoli backend team (this key is unique to your group).
  2. Your game must be able to:
    • Accept a JWT token from the frontend.
    • Send authenticated requests back to our API using both:
      • A valid JWT (from the user)
      • Your API Key

Understanding the JWT Token

A JSON Web Token is a secure and compact token used to verify the identity of a user.

Purpose

In the Tivoli system, the JWT token ensures that the player interacting with your game is logged in and authorised to play. It must be included with every request your game sends to the Tivoli API.

How It’s Created

Authentication Rules

Receiving the JWT (User Login)

When a player launches your game via the tivoli, they will be authenticated, and a JWT token will be passed to your game. Your game must read this token and store it for use in API requests to Tivoli. Otherwise the player can’t be identified and no transaction can go through.

Using the Tivoli API

Please refer to our project Enter Paneer Game as a resource to see how we've worked with JWT-token authentication and API-requests.

Test Account

Email: rune@yrgobanken.vip

Password: password

Yaml

Here you can download the yaml file to see all the API endpoints! Go to Swagger and import the file. Now you should see the Tivoli centralbank API. You only need to post transactions to the API. Follow the code example above to integrate it into your code seamlessly.

OBS!

We have discovered a small mistake regarding stamps. Unfortunately, you can only issue a stamp, which is firmly linked to a specific metal and an animal. This means that the possibility of adding a metal to a rammer will not exist. However, you can exchange any stamp you give out when you update your attraction or game, for a cost of $4. That cost is deducted from you and your team members. Have a good time!