Mythical Platform
Mythical Platform
  • The Mythical Platform API
  • Quick start
    • Authenticate
    • Create a guest player
    • Create an item type
    • Grant an item to a player
    • Update item metadata
    • Use webhooks for real time messages
    • Buy a listed item
  • API Reference
    • Players
    • Item Types
    • Items
    • Marketplace
      • Listings
      • Offers
      • Quick trade
      • Transaction history
      • Exchange rate
    • Webhook management
    • System
Powered by GitBook
On this page
  1. Quick start

Authenticate

In order to use the Mythical API, you must retrieve an authentication token.

// Retrieve your server authentication token
const response = await fetch('/v1/auth/token', {
    method: 'POST',
    headers: {
        "x-mythical-environment-id": "...",
        "clientId": "...",
        "clientSecret": "...",
    },
});

// Pass this in the header in subsequent requests
const { bearerToken } = await response.json();

The token must be passed with each request made to the server.

PreviousThe Mythical Platform APINextCreate a guest player

Last updated 6 months ago