> For the complete documentation index, see [llms.txt](https://dev.plyr.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.plyr.network/api-reference/assets/badge/list-badges.md).

# List Badges

{% hint style="info" %}
Retrieves a list of badges owned by a PLYR\[ID].
{% endhint %}

**Endpoint:** `/game/badge/list`\
**Method:** GET

{% tabs %}
{% tab title="Request Parameters" %}

```typescript
{
    plyrId: string;              // PLYR[ID]
    gameId: string;          // Game ID / PLYR[ID] of game
}
```

{% endtab %}

{% tab title="Success Response" %}

<pre class="language-typescript"><code class="lang-typescript"><strong>[
</strong>  {
    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,
  }
]
</code></pre>

{% endtab %}

{% tab title="Error Response" %}

```typescript
{
  error: string;
  details?: any;
}
```

{% endtab %}
{% endtabs %}

## Example Usage

```javascript
// 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
    }
});

```
