Multiplayer API

Multiplayer API

Documentation

Getting Started

Welcome to Multiplayer API documentation. This guide will help you get started with building multiplayer games using our platform.

Quick Start

  1. Create an account and choose your plan
  2. Get your API token from the dashboard
  3. Create your first game using the constructor
  4. Start making API calls to manage players and data
// Your first API call
curl -X POST https://api.michitai.com/api/game/create \
  -H "Content-Type: application/json" \
  -H "X-API-Token: your_token_here" \
  -d '{"name": "My First Game", "max_players": 100}'

Server Location: All API endpoints are hosted on secure servers in Europe (France) for optimal performance and GDPR compliance.

API Reference

Authentication

All API requests require authentication using your API token in the header:

X-API-Token: your_token_here

Endpoints

User Management

POST /api/register - Register new user
POST /api/login - User login
POST /api/logout - User logout

Game Management

GET /api/game/list - List all games
POST /api/game/create - Create new game
PUT /api/game/{id} - Update game
DELETE /api/game/{id} - Delete game

Logic Constructor

The visual logic constructor allows you to build game logic without coding using drag-and-drop blocks.

Supported Blocks

Control Flow

  • • If/Else conditions
  • • For/While loops
  • • Switch statements

Data Types

  • • Boolean, Integer, String
  • • Arrays and Objects
  • • Custom Enums

C# SDK

Use our C# SDK to integrate Multiplayer API into your Unity or .NET applications.

Installation

// Install via NuGet Package Manager
Install-Package MultiplayerAPI.SDK

// Or download from our SDK folder
// sdk/csharp-sdk.zip

Usage Example

using MultiplayerAPI;

var client = new MultiplayerAPIClient("your_api_token");
var game = await client.CreateGameAsync(new GameConfig 
{
    Name = "My Game",
    MaxPlayers = 100
});

Examples

Common implementation examples and use cases.

Player Authentication

// Authenticate a player
const response = await fetch('/api/player/auth', {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
        'X-API-Token': 'your_token'
    },
    body: JSON.stringify({
        player_id: 'player_123',
        password: 'player_password'
    })
});

Real-time Updates

// Update player data in real-time
await client.UpdatePlayerDataAsync(playerId, {
    level: 15,
    experience: 2500,
    items: ['sword', 'shield', 'potion']
});

Troubleshooting

Common Issues

401 Unauthorized

Check that your API token is valid and included in the X-API-Token header.

Rate Limiting

You've exceeded your plan's API call limit. Upgrade your plan or wait for the daily reset.

Storage Limit

Your account has reached the storage limit. Delete unused data or upgrade your plan.

Need Help?

If you can't find the answer to your question, contact our support team: