API Quickstart

Things to know before using an API

Prerequisite

  • You need to signup PLYR[ID] first on both Mainnet and Testnet. This PLYR[ID] gonna be a "Developer account and Game ID". Please set a name to be related with your game name.

  • API KEY and SECRET KEY — After you signup the PLYR[ID]. You can request us to generate API KEY Pair.

Basic to Call our API

We use "Timestamp + Body Payload" and signs with SECRET KEY as a HMAC (SHA256) signature. You need to include custom header apikey, signature, timestamp every time to call our API.

Base Headers

Every API request must include these base headers:

{
    apikey: string; // Your API key obtained from the developer portal
    signature: string; // HMAC signature of the request
    timestamp: string; // Current timestamp in milliseconds (Date.now().toString())
}

Header Requirements

Format Requirements:

- Headers are case-sensitive
- Values must be strings
- Timestamp must be in milliseconds

HMAC Signature Generation

Example 1: GET Method API without Body Payload.

Let see the example of "userInfo" API endpoint.

Example 2: POST Method API with Body Payload.

Let see the example of "getAvatars" API endpoint.

Last updated