# How to Verify the User/Player/VIP Level Requirement on Your Website with Callback Verification

**How the task works**

With this Level Requirement task, you can create giveaways only available for eligible users who meet the level requirements, and participants who don’t meet this requirement will not be able to join this giveaway. It helps you filter qualified participants and encourage users to reach the level you require for your website.

**Please follow the steps to set up the task and to integrate API callback.**&#x20;

**Step 1**

Choose a level type as the requirement for level verification on your website:&#x20;

<figure><img src="/files/IJvyl3Y4UIHvVb01S1tj" alt=""><figcaption></figcaption></figure>

<mark style="color:blue;">**To custom level requirement:**</mark>

You can customize the level name and relevant requirement based on the design of your website:

E.g. You can add a level type: super vip 4&#x20;

<figure><img src="/files/akVKrhs0c0QZs00BqqU0" alt=""><figcaption></figcaption></figure>

Your custom level will appear as follows:

<figure><img src="/files/HTK6wCMtvNUX5LFFMdCh" alt=""><figcaption></figcaption></figure>

**Step 2**

After that, you will need to obtain URL search params (<mark style="color:green;">track\_id=MikHklwcY\&leve1=true</mark>） from your website and parse out the trackId.

<figure><img src="/files/HncP2fdJXsPXNpezp0dT" alt=""><figcaption></figcaption></figure>

<mark style="color:blue;">**About TrackId:**</mark>

* TrackId is necessary to detect the user's participation in the task and to verify it. We will detect when a user clicks to participate in the task, the <mark style="color:green;">?trackId={{trackId}}</mark> will be used for detection.
* You will see the <mark style="color:green;">?trackId={{trackId}}\&level1=true</mark> applied to your website link:

If your website link is

<figure><img src="/files/51jmZYo6zecbbsaYIjof" alt=""><figcaption></figcaption></figure>

the visitors may come to your site via the link

<figure><img src="/files/io7JUDlJmoY1UQsSCfMl" alt=""><figcaption></figcaption></figure>

**Step 3**

Next, please copy the API key we provide you to integrate it with your website.

<figure><img src="/files/EpyqhAyusYw5Zfi1mgm0" alt=""><figcaption></figcaption></figure>

Then enter the parameters according to the rules of const data, and encrypt the whole const data using the standard **HmacSHA256 algorithm.**

<figure><img src="/files/mPybF3aThvBxSa9ZTuUm" alt=""><figcaption></figcaption></figure>

**Step 4**

Use our official API below and pass the corresponding parameters in the following code.&#x20;

**official API:** <https://cwallet.com/cctip/v1/giveaway/task/callback>

```javascript
// const api_key =
      "3lhpTSAJd6XDgBe4XWcozob4iMmYUlkPc9c4fwnoydGk4Bh5lSA3qrSiqgXeJcX7"; // your api_key
    const event = “level1” //your chose level

    const { track_id} = queryString.parse(window.location.search); // url search

    const remark = "remark"; // optional

    const data = `track_id=${track_id}&event=${event}&remark=${remark}`; // optional
    
    const sign = crypto.HmacSHA256(data, api_key).toString(); // HmacSHA256

    fetch("https://cwallet.com/public/v1/giveaway/task/callback", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        track_id,
        sign,
        event,
        remark,
      }),
    }).then(async (res) => {
      console.log(await res.json());
    });
```

**Step 5**

Enter your website address and click '**Check API callback**' to test if the integration is successful and task is verifiable.

<figure><img src="/files/oFPdYOjZ4xzVNHYpAhVf" alt=""><figcaption></figcaption></figure>

**Note**:&#x20;

Each project you created on Cwallet Giveaway Tool will have a unique API key, and it will not change. So you only need to integrate once for a website. Also, you will be able to create tasks on multiple websites if you need to.


---

# 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://docs.cwallet.com/cwallet-tools/giveaway/how-to-verify-the-user-player-vip-level-requirement-on-your-website-with-callback-verification.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.
