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:
- You must request an API Key from the Tivoli backend team (this key is unique to your group).
- 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
- The JWT is created by the Tivoli backend when the user logs in.
- The token contains digitally signed data (e.g. user ID, expiration time, etc.).
- Your game does not need to parse or validate the token — only attach it in requests.
Authentication Rules
- A JWT token is required for all user-specific requests, such as reporting a win.
- An API key is required for all authenticated group-level requests (these are not used by regular users).
- Some endpoints are publicly accessible, such as viewing an amusement via an embedded iframe.
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!