# Gratification API

### Server-side Rewarded Callbacks

Last Update: 22nd June, 2017

***

#### Overview

Publishers can set a secure rewarded server-side callback on the settings page for your app. The endpoint will be triggered as soon as user completes the rewarded video.

This callback is called asynchronously, and should not be used to give rewards. Client-side callbacks should be used to give rewards, and use the server-side callbacks to confirm the reward. The request will be GET with following parameters as query parameters.

**The request has following format:**

```
[PUBLISHER LINK URL]?app_id=[APP_ID]&unique_id=123456×tamp=1453113302&token=0be9ce5718cda64030c3fa1a0dcd16d4&points=2.5&network_id=12
```

\[PUBLISHER LINK URL]: This url is provided by the developer in the app settings page.

app\_id: The app id of your application. It can be found on your app settings page.

unique\_id: This id will be used by the publisher to identify the user. It has to be set by the publisher in the Pokkt Sdk.

points: This is a float value denoting the amount of reward given to that user. If it is not sent then default value 0 is assumed.

timestamp: This is current timestamp in milliseconds.

token: This token is used to authenticate callbacks. Token is generated using the hash function md5 on the string combination of app\_id, unique\_id, timestamp, points and app secret key. The secret key can be found out from your app settings page.

encodedPubParams: This is custom data which you can set from the SDK when showing a rewarded video, like the level name etc.

network\_id: This is the mediation network id which can be found on the mediation settings page. In case of rewarded ad from Pokkt Network, network\_id will be null.


---

# 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://wiki.pokkt.com/api-guide/gratification-api.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.
