# How to Create Free Mint NFT Rewards with Callback Verification

With the successful integration of the API callback, winners will be able to mint their own NFT on your website via a specific URL containing their track\_id and eligibility.

**Please follow the steps to create Free Mint NFT reward and to integrate API callback.**&#x20;

**Step 1**

Enter a reward name, number of winners, and upload an image of that reward.

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

**Step 2**

After that, you will need to get url params (something like <mark style="color:green;">track\_id=Edg1Y475BiU</mark>) from your website and parse out the trackId.

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

<mark style="color:blue;">**About track\_id:**</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}}</mark> applied to your website link:

If your website link is

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

the visitors may come to your site via the link

<figure><img src="/files/sG4SEJhW7lCvmdsSBFUB" 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/fk29a2c5PmhwtWDNXhsr" 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/h9duAbOjcFrYJ1KyQCQX" alt=""><figcaption></figcaption></figure>

**Step 4**

Use our official API below and pass the corresponding parameters in the following code.

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

```javascript
const api_key = "3lhpTSAJd6XDgBe4XWcozob4iMmYUlkPc9c4fwnoydGk4Bh5lSA3qrSiqgXeJcX7"; // your api_key 

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

const timestamp=new Date().getTime() 

const data = `track_id=${track_id}&timestamp=${timestamp}` 

const sign = crypto.HmacSHA256(data, api_key).toString(); // HmacSHA256 

fetch("https://cwallet.com/cctip/v1/giveaway/player/status", { 
method: "POST",
headers: { 
"Content-Type": "application/json", 
}, 

body: JSON.stringify({ 
track_id, 
sign, 
timestamp, 
}), 
}).then(async (res) => { 
console.log(await res.json()); 
});
```

**Step 5**

After the above steps are completed, enter your website link and click the ‘Check API callback’ to test it.

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

**Note:**

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 Free Mint NFT reward 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-create-free-mint-nft-rewards-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.
