# How to Verify Custom App Actions with Callback Verification

Utilize callback verification to automatically verify whether users have taken any actions within the app. Participants who have performed the actions are eligible to complete this task. All types of tasks can be verified!

**Follow the steps to enable the callback verification:**

**Step 1**

Choose or customize action tasks that users need to complete on the app.

<figure><img src="https://content.gitbook.com/content/LIfMHqDEB5rVHERvbUyz/blobs/TtiYNGor2sPz7wOarQqM/Screen%20Shot%202022-12-13%20at%2017.41%201.png" alt=""><figcaption></figcaption></figure>

**To custom a task:**

Select custom task, customize the task name, it is optional to specify the number of times/value, etc. Click **Create** to save your changes

<figure><img src="https://content.gitbook.com/content/LIfMHqDEB5rVHERvbUyz/blobs/W5x9QaH87OjRyQz77Sfg/Screen%20Shot%202022-12-13%20at%2017.43%201.png" alt=""><figcaption></figcaption></figure>

**Step 2**

Input the name of your app, the download URLs for the Apple App Store and Google Play Store, and the Android APK URL.

<figure><img src="https://content.gitbook.com/content/LIfMHqDEB5rVHERvbUyz/blobs/u2atV0jCq3U0MB4161NB/image%20145%20(2).png" alt=""><figcaption></figcaption></figure>

**Step 3**

After that, you will need to obtain deep link params (something like <mark style="color:green;">track\_id=4wmmHtD4rSA</mark>) from your app and parse out the trackId.

<figure><img src="https://content.gitbook.com/content/LIfMHqDEB5rVHERvbUyz/blobs/GrrSinQwUE1ppdg4mI5t/Frame%20514336%20(6).png" 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}}\&send={{send}}</mark> applied to your app deep link:

If your app deep link is

<figure><img src="https://content.gitbook.com/content/LIfMHqDEB5rVHERvbUyz/blobs/iLLvQcVncixrQLNBY2Y2/Frame%20514336%20(5).png" alt=""><figcaption></figcaption></figure>

the users may open your app via the link

<figure><img src="https://content.gitbook.com/content/LIfMHqDEB5rVHERvbUyz/blobs/T2DL6VUTb9nIwbVrqlTi/Frame%20514335%20(12).png" alt=""><figcaption></figcaption></figure>

**Step 4**

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

<figure><img src="https://content.gitbook.com/content/LIfMHqDEB5rVHERvbUyz/blobs/1PKwwHHYWY4RQbhe2f7q/image%20144%20(2).png" 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="https://content.gitbook.com/content/LIfMHqDEB5rVHERvbUyz/blobs/knt5cWhxUzXZBOmv4ETD/Frame%20514335%20(14).png" alt=""><figcaption></figcaption></figure>

**Step 5**

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 { track_id, send } = queryString.parse(deepLink.search); //your deepLink params

const event = "send";

const remark = "remark"; // optional

const data = `track_id=${track_id}&event=${send}&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 6**

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

<figure><img src="https://content.gitbook.com/content/LIfMHqDEB5rVHERvbUyz/blobs/Jo2iX8yJScsGsivrYZbc/image%20145%20(3).png" alt=""><figcaption></figcaption></figure>

**Note:**

Each project you created on Cwallet Giveaway Tool will have a unique API key, and it will not change. Additionally, each app must be integrated separately.
