Introduction

Welcome to the Admin / Server API documentation! This API is designed to provide comprehensive functionalities for managing and administering your game environment. It is important to note that this API does not require player login for authentication, making it specifically tailored for administrative purposes.

Authenticating Admin / Server API Request

As mentioned earlier, authentication through player login is not required for accessing the Admin / Server API endpoints. This means that you can freely perform administrative tasks without the need for player credentials.

To ensure secure access to the Admin / Server API, we utilize Basic authorization. The authentication process involves including your client credentials as part of the authorization header when making API requests.

Step 1: Obtain Client Credentials

Before you can authenticate your requests, you need to obtain your client credentials, which consist of a client_id and a client_secret. These credentials are provided to you from Developer Dashboard.

Step 2: Include Authorization Header

When sending API requests, include the Authorization header in the following format:

Authorization: Basic <base64_encoded_credentials>

Replace <base64_encoded_credentials> with the Base64-encoded string of your client credentials in the format client_id:client_secret. For example, if your client_id is "my_client" and your client_secret is "my_secret", the header would look like:

Authorization: Basic bXlfY2xpZW50Om15X3NlY3JldA==

Step 3: Send API Requests

Send your API requests with the included Authorization header. The server will validate your credentials and grant access to the requested endpoints.

Handling Authentication Errors

If your authentication fails or the provided credentials are invalid, you will receive an appropriate error response (e.g., HTTP 401 Unauthorized). In such cases, verify that you have correctly included the Authorization header with the valid client credentials.

Ensure that you securely store and manage your client credentials, as they grant administrative access to your game environment. Treat them as sensitive information and avoid exposing them to unauthorized individuals.

API Usage

The Admin / Server API offers a wide range of endpoints to assist you in managing your game environment efficiently. These endpoints enable you to perform tasks such as:

  1. Managing tournaments: create tournament for your game, assign players to the tournament slot, set the winner of tournament matches

  2. Item shop: create your own in-game shop, add or remove items from the shop, view shop transactions

Last updated