# VerifyClaimingCode

{% hint style="info" %}
Verify the validity of an Instant PlayPass claiming code.
{% endhint %}

**Endpoint:** `/instantPlayPass/verify/claimingCode/{claimingCode}`\
**Method:** GET

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

```typescript
{
    claimingCode: string; // The claiming code to verify
}
```

{% endtab %}

{% tab title="Success Response (200)" %}

```typescript
{
    valid: boolean; // Whether the claiming code is valid
    status: string; // Status of the claiming code
}
```

{% endtab %}

{% tab title="Error Response" %}

```typescript
{
    error: string;
}
```

{% endtab %}
{% endtabs %}

## Example Usage

```javascript
const timestamp = Date.now().toString();
const claimingCode = 'ABC123XYZ'; // The claiming code to verify

// Since this is a GET request with no body, pass null as the body for HMAC
const hmac = generateHmacSignature(timestamp, null, secretKey);

const response = await axios.get(apiEndpoint + `/instantPlayPass/verify/claimingCode/${claimingCode}`, {
    headers: {
        apikey: apiKey,
        signature: hmac,
        timestamp: timestamp
    }
});

// Check the validity and status of the claiming code
const { valid, status } = response.data;

if (valid) {
    console.log('Claiming code is valid');
    console.log('Status:', status);
    // Proceed with the claiming process
} else {
    console.log('Claiming code is invalid or expired');
    // Handle invalid code (e.g., ask user to try again)
}
```

{% hint style="warning" %}
Claiming codes can only be used once.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dev.plyr.network/api-reference/users/authentication/instantplaypass/verifyclaimingcode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
