AppLovin’s servers can make server-to-server rewarded callbacks to an external server that you define.
These callbacks notify you that a user of your app completed a rewarded ad and so that user qualifies for a reward.
This protects against malicious users who attempt to gain rewards without finishing rewarded ads.
Introduction
AppLovin’s servers can send callbacks to an external endpoint after the user completes a rewarded ad that is served via MAX mediation.
You define which endpoint receives these requests.
The callbacks are in the form of HTTP or HTTPS GET requests.
AppLovin makes these callbacks soon after the ad completion, but they may be delayed by up to a few minutes.
You can use an impression timestamp macro to reconcile any delay between the impression and the callback times.
The callback request times-out if five seconds pass without a response from your endpoint.
If the callback request times out, AppLovin will retry the callback up to two times.
You can configure these callbacks by setting the value of Server Side Callback URL in the Edit Ad Unit page for any of your rewarded Ad Units.
Example
Available Macros
You can incorporate any of the macros in the following table into your callback URL.
The example URL above incorporates the {IDFA}, {USER_ID}, {EVENT_ID}, and {EVENT_TOKEN} macros.
AppLovin’s servers replace these macro names with accurate values when the servers make the callback to your endpoint.
Name
Description
Example
{AD_UNIT_ID}
MAX Ad Unit ID (16 hex characters)
9ad0816ac071552a
{AD_UNIT_NAME}
Ad Unit name (URL-encoded)
My%20App%20Banners
{AMOUNT}
The amount of currency you choose to award the user. You set this in the Ad Unit edit page for each Ad Unit.
100
{CC}
Two-letter country code of the user
gb
{CURRENCY}
The type of currency you choose to award the user (URL-encoded). You set this in the Ad Unit edit page for each Ad Unit.
coins
{CUSTOM_DATA}
Custom data passed in from the integration (URL-encoded). AppLovin recommends that you keep the size of the string under 8192 characters.
App Package Name (Android) or Bundle ID (iOS). URL-encoded.
com.test.app
{PLACEMENT}
Publisher-defined MAX ad placement name (URL-encoded)
Launch%20Screen
{PLATFORM}
Platform
android , ios
{TS}
Timestamp of the ad load time (integer, seconds since epoch)
1546300800
{USER_ID}
Publisher-defined user ID (URL-encoded); maximum length is 8192 characters
7634657898
1 Note: if EVENT_TOKEN is one of your macros, it is omitted from the “All macros alphabetically” string
Setting an Ad Placement Name
The following code snippets show you how you can add a placement name to an ad unit.
The value of the placement name replaces the {PLACEMENT} macro in postback requests:
The following code snippets show you how to add custom String data to postbacks.
This String data replaces the {CUSTOM_DATA} macro in these postbacks.
AppLovin recommends that your string contain fewer than 8192 characters.