Welcome to the Gachabe API

The Gachabe API provides access to GachaBE, a comprehensive Backend-as-a-Service platform designed specifically for games with gacha mechanics. Through this API, you can integrate your games with GachaBE’s services including player authentication, chest systems, collectibles management, and more.

Gachabe OpenAPI Specification

View the complete OpenAPI specification

API Overview

The Gachabe API allows your games to interact with the GachaBE platform services. It’s organized around REST principles and uses JSON:API formatting for consistent, predictable responses. All endpoints return JSON and use standard HTTP response codes to indicate success or failure.

Base URL

https://gachabe-staging.fly.dev/api/v1/

API Version

All API endpoints are versioned and currently use /api/v1/ as the base path.

Authentication

Most API endpoints require player authentication using Bearer tokens. Players of your game must authenticate to access their data and perform operations. Only the authentication endpoints themselves can be accessed without tokens.

Bearer Token Authentication

All requests on behalf of players must include their valid JWT token in the Authorization header:
Authorization: Bearer PLAYER_JWT_TOKEN

Player Authentication Flow

Your players can create an account and obtain their authentication tokens through several methods:

Response Format

All API responses follow the JSON:API specification, providing a consistent structure:
{
  "data": {
    "id": "123",
    "type": "chest",
    "attributes": {
      "name": "Dragon Treasure Chest",
      "description": "A magical chest containing rare collectibles"
    }
  }
}

Core Concepts

Players & Authentication

Players are the end users of your game who interact with the GachaBE platform through your game’s interface. Each player has their own isolated data including inventory, currency balance, and collection progress. Players authenticate directly with GachaBE to access their personal game data.

Chests

Chests are purchasable lootboxes that can be opened to reveal collectibles. Each chest can have a cost in game currency and contains a randomized selection of collectibles.

Collections

Collections group related collectibles together thematically (e.g., “Dragon Artifacts”, “Elemental Gems”). Players can work toward completing entire collections.

Collectibles

Individual items that players can collect. Each collectible belongs to a collection and has attributes like rarity, name, and description.

Rate Limits

GachaBE is in an alpha stage and does not currently enforce strict rate limits. So we ask you to not overload the API with excessive requests.

Support

Need help with the Gachabe API? Here are some resources: