For the complete documentation index, see llms.txt. This page is also available as Markdown.

List Badges

List badges owned by an address

Retrieves a list of badges owned by a PLYR[ID].

Endpoint: /game/badge/list Method: GET

{
    plyrId: string;              // PLYR[ID]
    gameId: string;          // Game ID / PLYR[ID] of game
}
[
  {
    gameId: string,
    slug: string,
    tokenId: string,
    plyrId: string,
    owner: string,
    metaJson: {
      name: string,
      slug: string,
      image: string,
      attributes: [
        { trait_type: string, value: string },
      ]
    },
    createdAt: string,
  }
]

Example Usage

// Setup request parameters
const timestamp = Date.now().toString();
const params = {
    plyrId: 'fennec', 
    gameId: 'zoono',
};

// Generate HMAC signature
const hmac = generateHmacSignature(timestamp, params, secretKey);

// Make the API request
const response = await axios.get(apiEndpoint + '/game/badge/list', {
    params,
    headers: {
        apikey: apiKey,
        signature: hmac,
        timestamp: timestamp
    }
});

Last updated