# Welcome to Digital Turbine Documentation

<table data-view="cards"><thead><tr><th></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td><h2><strong>App Developers</strong></h2></td><td><a href="/spaces/8KSLu5HNiyDWpvGRZh7B/pages/EPWbYFVCTVREg7ZsqQHx">/spaces/8KSLu5HNiyDWpvGRZh7B/pages/EPWbYFVCTVREg7ZsqQHx</a></td><td><a href="/spaces/4IftQ9WUOy9feTA5sZeE/pages/c7qMREw5e5UbkO6DDlj3">/spaces/4IftQ9WUOy9feTA5sZeE/pages/c7qMREw5e5UbkO6DDlj3</a></td><td><a href="/spaces/7drDlNSyycpmA7Zx8kgX/pages/nVRYUz8D7TNQHIShyJpg">/spaces/7drDlNSyycpmA7Zx8kgX/pages/nVRYUz8D7TNQHIShyJpg</a></td><td><a href="/spaces/Ldj0tVukw8un0q4Tk4aZ/pages/Dk0ELLnJOfJNsMvwppcH">/spaces/Ldj0tVukw8un0q4Tk4aZ/pages/Dk0ELLnJOfJNsMvwppcH</a></td><td><a href="/spaces/w3TfeotwEEwchZ7E1NM2/pages/zB3jWYC2XG2BeM0xQCQm">/spaces/w3TfeotwEEwchZ7E1NM2/pages/zB3jWYC2XG2BeM0xQCQm</a></td><td></td><td><a href="/files/oOvlQ7SViuDPdxHIlvd0">/files/oOvlQ7SViuDPdxHIlvd0</a></td></tr><tr><td><h2><strong>Advertisers</strong></h2></td><td><a href="/spaces/PjOUlm6QueGVedz2Q6CG/pages/vuOQqKt78ti0vXM6Ns3O">/spaces/PjOUlm6QueGVedz2Q6CG/pages/vuOQqKt78ti0vXM6Ns3O</a></td><td><a href="/spaces/NtLj6BGAMwZZCRHt4uCw/pages/l4rGVi9TTRbOoJOp93dy">/spaces/NtLj6BGAMwZZCRHt4uCw/pages/l4rGVi9TTRbOoJOp93dy</a></td><td></td><td></td><td></td><td></td><td><a href="/files/6jNRFjlSzafi1ujMTfpN">/files/6jNRFjlSzafi1ujMTfpN</a></td></tr><tr><td><h2><strong>Demand Partners</strong></h2></td><td><a href="/spaces/zHXGOnXklkL7iA6EmvEH/pages/ETNbX4UsZK3b3wBxTOIS">/spaces/zHXGOnXklkL7iA6EmvEH/pages/ETNbX4UsZK3b3wBxTOIS</a></td><td></td><td></td><td></td><td></td><td></td><td data-object-fit="cover"><a href="/files/hmp7v5l8sXevS1nxHiCd">/files/hmp7v5l8sXevS1nxHiCd</a></td></tr></tbody></table>


# DT Exchange for Publishers

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="2b50">⭐</span> Top Articles</td><td></td><td><a href="/pages/OGMjB8IUq18X1Ae5ONzu">/pages/OGMjB8IUq18X1Ae5ONzu</a></td><td><a href="/pages/F6DMkzZmTPj0SZXnPGxb">/pages/F6DMkzZmTPj0SZXnPGxb</a></td><td><a href="/pages/H2yaAWe6voiSV1qrZ2NA">/pages/H2yaAWe6voiSV1qrZ2NA</a></td><td><a href="/pages/M6GTHuXkDOm8FgPKzeEc">/pages/M6GTHuXkDOm8FgPKzeEc</a></td><td></td><td><a href="/pages/DtGu9S52vOORDSdUiiwv">/pages/DtGu9S52vOORDSdUiiwv</a></td><td><a href="/pages/wquWTAWbLHXDlZeojx6M">/pages/wquWTAWbLHXDlZeojx6M</a></td><td></td><td></td><td></td><td><a href="/pages/M0NTczyLOCcjbQg0YFx6">/pages/M0NTczyLOCcjbQg0YFx6</a></td></tr></tbody></table>


# Getting Started with DT Exchange

DT Exchange is a programmatic monetization solution connecting publishers to top global demand sources from the world's top brand and user-acquisition buyers.

To get started with DT Exchange:

## Set Up Your App in the DT Console <a href="#h_01ha9fr0c56jjektd3ya93bz6w" id="h_01ha9fr0c56jjektd3ya93bz6w"></a>

As a DT Publisher, add your app and placements to the DT ecosystem via the [DT Console](https://console.fyber.com/). For more information about how to set up your app and placements for DT Exchange, see [Setting Up Your App in the DT Console](/dt-exchange/getting-started-with-dt-exchange/setting-up-your-app-in-the-dt-console). For more information about how to become a DT Publisher, see [Signing Up for DT Console](/dt-console/authorization/signing-up-for-dt-console).

## Integrate the DT Exchange SDK <a href="#h_01ha9fr0c511psbmh261b1sehf" id="h_01ha9fr0c511psbmh261b1sehf"></a>

The DT Exchange SDK is lightweight and comes complete with advanced server-side controls, first-class ad rendering capabilities, and internal ad quality features. These features ensure a stable performance and ad experience across all supported ad formats.

For more information about how to integrate the DT Exchange SDK, see the following articles:

* [Integrating the Android SDK](/dt-exchange/sdk-configuration/integrating-the-android-sdk)
* [Integrating the iOS SDK](/dt-exchange/sdk-configuration/integrating-the-ios-sdk)


# Setting Up Your App in the DT Console

To set up apps and offer placements on the DT Exchange, you must have access to the DT self-service web dashboard, [DT Console](https://console.fyber.com/). Signing in to the DT Console requires a DT Publisher account.

For more information, see articles on [Signing Up for DT Console](/dt-console/authorization/signing-up-for-dt-console) and [Signing In to the DT Console](/dt-console/authorization/signing-in-to-the-dt-console).

Once you have the credentials and your account has been confirmed, configure your app:

* [Step 1: Add your app](#addapp).
* [Step 2: Add placements to your app](#addplacements).

## Step 1: Add Your App <a href="#addapp" id="addapp"></a>

The DT Console allows you to add your app whether or not it is published in an app store. When you add your app, you can either add placements at the same time or add your placements after adding your app.

To add your app using the DT Console:

1. In the [DT Console](https://console.fyber.com/), go to **Monetization → App Management**, and click **Add App**.
2. Enter details about your app.\
   For more information, see our [Adding an App](/dt-console/app-management/adding-a-new-app/adding-an-app) article.
3. Enter placements for your app as described in [Working with Placements When Adding an App](/dt-console/app-management/adding-a-new-app/working-with-placements-when-adding-an-app), or skip this step now and add them later.
4. Click **Add app**.

## Step 2: Add Placements to Your App <a href="#addplacements" id="addplacements"></a>

You can add multiple placements to one app, and you must add at least one placement to monetize your app. For each placement, you can define a specific ad format, configuration, and delivery rules to maximize performance.

To add a placement to your app:

1. In the [DT Console](https://console.fyber.com/), go to **Monetization → App Management**, and click your app.
2. On the **Placements** tab, click **Add placement**.
3. Enter basic placement details (ad type, floor price, and name), and click **Add** at the end of the new placement row.\
   For more information, see [Setting Up Placements](/dt-console/app-management/setting-up-an-existing-app/setting-up-placements).
4. To configure additional placement settings (targeting, refresh rate, capping, pacing, etc.), click the newly added placement, enter the desired settings, and click **Save**.


# Advanced Configurations


# Block Lists

Block lists allow you to specify ads you do not want to appear in your app. You can block ads based on the following ad properties:

* Advertiser: Blocks ads from specified advertiser domains.
* Individual App Campaigns: Blocks ads that promote specific apps to prevent competition or undesired content.
* Creatives: Blocks specific ad creatives by their unique identifiers to manage content at a granular level while allowing the rest of the publisher or website's ads

## Block Lists Levels

You can apply block lists to specific apps in your account or all of the apps in your account:

* All Apps Levels: Applies the block list to all advertisers and affects all apps linked to the advertiser's domain.
* App Level: Applies the block list to specific apps, which targets individual apps or creatives without affecting other ads within the same publisher or advertiser domain. DT automatically adds apps blocked at the app level to the publisher-level blocking list, which ensures comprehensive control of ad content across all apps within the account.

## Viewing Block Lists

To view block lists:

1. Log in to the [DT Console](https://console.fyber.com/login), and navigate to **Block Lists**.

<div align="left" data-with-frame="true"><img src="/files/pdIKrNcCASlKYKRqyw21" alt="" width="228"></div>

2. Select one of the following tabs to view the blocked content on your account:
   * **Advertisers**
   * **Individual App Campaigns**
   * **Creatives**

<div align="left" data-with-frame="true"><img src="/files/JbKQVSZmNLOa6Rt7ZBn6" alt=""></div>

3. (Optional) To copy a block list from one app to another, click **COPY BLOCK LIST**.
4. (Optional) To delete a blocked list, click **CLEAR ALL**.

## Blocking Advertiser Domains

The **Advertiser's** tab allows you to view or block ads from specific advertisers across all your apps at the account level. This only blocks an ad if the advertiser domain matches the domain provided by the Advertiser (if any). To block advertiser domains:

1. Click **ADD TO BLOCK LIST**, from the **Advertisers** tab.\
   The **Add advertiser domains** window appears.

<div align="left" data-with-frame="true"><img src="/files/dIfxrY0BqWQqe8c7Af7w" alt=""></div>

2. Enter the domain name in domain format, `ABC.XYZ`, and click **Save**.\
   For example, `testing.com`.\
   The newly added advertiser domain appears in the blocked **Advertisers** list.

{% hint style="info" %}
When blocking advertiser domains, note the following:

* You can add multiple entries separated by a comma.
* DT allows a maximum of 5000 domains.
* Entries must be at least three characters in length.
* DT validates all block list entries and rejects incorrect entries. A rejection message appears below the relevant field when an entry is invalid. Verify that the entry is accurate and matches the required format.
  {% endhint %}

3. (Optional) To view the blocking settings per app, click **Blocked advertiser on the app level**.

## Blocking Individual App Campaigns

The **Individual Add Campaigns** tab allows you to block ads from specific apps by entering the app's Android bundle ID or iOS app ID. To block individual app campaigns:

1. Click **ADD TO BLOCK LIST**, from the **Individual App Campaigns** tab.\
   The **Add Android bundle IDs** or the **Add iOS app IDs** window appears.

<div align="left" data-with-frame="true"><img src="/files/IrPYKTQbOrBeCPU0OLcc" alt=""></div>

2. Enter either the **Android bundle IDs** or **iOS app IDs** that you want to block and click **Save**.\
   Each platform's new blocked **Individual App Campaigns** list appears in the relevant areas.\
   The newly added **Individual Add Campaign** appears in the blocked **Individual App Campaigns** list. 3. (Optional) To view the blocking settings per app, click **Blocked individual app campaigns on the app** **level**.

## Blocking Creatives

The **Creatives** tab allows you to block specific ad creatives using unique identifiers, providing more control over content. To block specific creatives:

1. Click **ADD TO BLOCK LIST**, from the **Creatives** tab.\
   The **Add creative IDs** window appears.

<div align="left" data-with-frame="true"><img src="/files/MBCXD2PKeu4ghbiMGeMN" alt=""></div>

2. Enter specific **Creative IDs**, and click **Save**.\
   The newly added **Creative IDs** appear in the **Blocked Creatives** list.

{% hint style="info" %}
Some ads use different Creative IDs for different buyers. To block an ad, add all its creative IDs to this list.
{% endhint %}


# app-ads.txt

As an extension of its [Authorized Digital Sellers (`ads.txt`)](https://iabtechlab.com/wp-content/uploads/2022/04/Ads.txt-1.1.pdf) specification, the Interactive Advertising Bureau (IAB) provides the [Authorized Sellers for Apps (`app-ads.txt`)](https://iabtechlab.com/wp-content/uploads/2019/03/app-ads.txt-v1.0-final-.pdf) specification that defines how app publishers should list their authorized monetization partners. Using this file, buyers can confidently identify authorized sellers and prevent app domain spoofing and unauthorized selling of in-app inventory.

To implement `app-ads.txt` for fraud prevention, complete the following tasks:

* Add DT to your `app-ads.txt` file. This authorizes DT as a direct seller. For more information, see [Adding DT to Your app-ads.txt File](#adddt).
* Add the `app-ads.txt` file to the root of your developer or marketing website. For more information, see [Place Your app-ads.txt File](#txtlocation).
* Add your website URL to your app store listing. Buyers only search the listed sites for `app-ads.txt` files. For more information, see [Adding a Developer Website](#addurl).

## Adding DT to Your app-ads.txt File <a href="#adddt" id="adddt"></a>

To list DT in your app-ads.txt file:

1. Create your `app-ads.txt` file according to the IAB specification for [`ads.txt`](https://iabtechlab.com/wp-content/uploads/2022/04/Ads.txt-1.1.pdf).
2. Add DT as a direct seller in your `app-ads.txt` file by copying the following record into your `app-ads.txt` file and entering your DT Publisher ID where indicated.\
   For more information, see [Locating Your DT Publisher ID](#dtid).

```
fyber.com,YOUR_DT_PUBLISHER_ID,DIRECT,1ad675c9de6b5176
```

3. Add official DT resellers in your `app-ads.txt` file. For a complete list of official resellers, see [app-ads.txt Contents](#section-listing-indirect-authorized-sellers).

### Locating Your DT Publisher ID <a href="#dtid" id="dtid"></a>

To locate your DT Publisher ID:

1. Log in to the [DT Console ](https://console.fyber.com/login)and click your user name at the top-left of the screen.
2. Select **User Profile**.

<div align="left" data-with-frame="true"><img src="/files/pdIKrNcCASlKYKRqyw21" alt="" width="228"></div>

3. From the **Basic Reporting API - Credentials** section, copy your **Publisher ID**.

<div align="left" data-with-frame="true"><img src="/files/f7xXQOmKADdnSOdJvSIK" alt=""></div>

### app-ads.txt Contents <a href="#section-listing-indirect-authorized-sellers" id="section-listing-indirect-authorized-sellers"></a>

The `app-ads.txt` file contains entries for DT and our official resellers.

Copy the contents into your `app-ads.txt` file and enter your DT Publisher ID where indicated.

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th data-hidden data-card-cover data-type="image">Cover image</th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>Click to Open DT's app-ads.txt File</td><td><a href="/files/FkHIpk9wbheDS65vGj3f">/files/FkHIpk9wbheDS65vGj3f</a></td><td><a href="https://www.digitalturbine.com/dt-app-ads.txt">https://www.digitalturbine.com/dt-app-ads.txt</a></td></tr></tbody></table>

{% hint style="danger" %}
Beware of unknown companies reaching out directly and requesting to be added to your `app-ads.txt` file. This may be fraud. DT strongly advises that you only list your direct partners and their official resellers.

If you suspect a company is fraudulently contacting you, contact your DT Representative.
{% endhint %}

## Place Your app-ads.txt File <a href="#txtlocation" id="txtlocation"></a>

When placing your `app-ads.txt` file on your domain, ensure that the location meets the following criteria:

* Either the root of your domain (`fungames.com/app-ads.txt`) or no more than one subdomain below the root (`my.fungames.com/app-ads.txt`).
* If you place the file in a subdomain, do not place it in either the `www.` or `m.` subdomains.

## Adding a Developer Website <a href="#addurl" id="addurl"></a>

List your developer website URL in all app stores where you offer your app so that advertising platforms can locate your `app-ads.txt` file. The following sections provide guidance in entering a website URL for your app listing.

### Apple App Store <a href="#h_01k5hb3zmd0ffz3zvx3k9m3fn1" id="h_01k5hb3zmd0ffz3zvx3k9m3fn1"></a>

The App Store provides your Developer URL as part of the app listing.

<div align="left" data-with-frame="true"><img src="/files/J3k83PtOrYAgEMrvb2Ai" alt=""></div>

To update or add a developer website to your App Store listing:

1. Log in to [App Store Connect](https://appstoreconnect.apple.com/login) and locate your app and version.
2. In the **Marketing URL** field, enter the URL for the domain where you placed your `app-ads.txt` file.

<div align="left" data-with-frame="true"><img src="/files/HxXe9AInhNiermueVXVJ" alt=""></div>

### Google Play <a href="#h_01k5hb3zmdvb6aj31cskxy6xj3" id="h_01k5hb3zmdvb6aj31cskxy6xj3"></a>

The Google Play Store lists your developer URL in the **App Support** section of your app store listing.

<div align="left" data-with-frame="true"><img src="/files/c8y0s9j5PtQ2IvzPyD0U" alt=""></div>

To specify your developer website for Google Play:

1. Log in to the [Google Play Console](https://play.google.com/console) and go to **Store presence→Store settings**.

<div align="left" data-with-frame="true"><img src="/files/NaOo1zCYa6YV7HPRW5za" alt=""></div>

2. Click **Edit** and enter the URL for the domain where you placed your `app-ads.txt` file.

<div align="left" data-with-frame="true"><img src="/files/KDeYao5hYs9E4P69n6c6" alt=""></div>


# DT Exchange Management API

The process of creating and maintaining waterfalls is both time and resource consuming. Once you have completed the verification process, the Management API provides a simple and quick method for publishers to create and maintain all settings required to monetize their apps with ads.

With the Management API you can perform the following functions for Apps and Placements:

* Get (retrieve)
* Create
* Update
* Delete

The Management API enables automation of the processes, when relying on insights and decisions taken on the publisher side.


# Authentication

DT's API endpoints are secured, and must be used with an authentication token.

The first step is to obtain an authorization header for authentication. This enables you to use the Management API and be verified as a user within the Console.

Generating your verification keys:

1. Click your login user name in the top-left corner.

<div align="left" data-with-frame="true"><figure><img src="/files/pdIKrNcCASlKYKRqyw21" alt="" width="228"><figcaption></figcaption></figure></div>

2. Click **User Profile** to open the User Profile Window.

<div align="left" data-with-frame="true"><figure><img src="/files/EORvAtVYRB6hxi2twtNB" alt=""><figcaption></figcaption></figure></div>

3. In the `Management API - Credentials` section, the **Client ID** and **Client Secret** Keys are displayed.

## Generate New Keys

You should generate new verification keys on a regular basis. In order to generate new keys, you must first revoke the current keys.

**To generate new verification keys:**

1. Log in to the [DT Console](https://console.fyber.com/), and click your user name in the left-hand menu.
2. Click **User Profile**.
3. For the verification keys you want to re-generate, click **Revoke**.

<div align="left" data-with-frame="true"><img src="/files/7NG2ySlK8OBq7xZ6gsdw" alt=""></div>

4. Click **Generate New Keys**. The keys you have generated must now be placed in the Endpoint to generate your Access Token to the Management API.

### Generating Your Access Token

Copy both the Client ID and Client Secret keys and create an HTTP request with the following body.

**Description**

Use the UI Management API credentials to authenticate your user and get back an access token to authorize further requests.

**Method**

`POST https://console.fyber.com/api/v2/management/auth`

### Request Parameters

| Key            | Description                                                                                                      | Type   | Required | Example                                      |
| -------------- | ---------------------------------------------------------------------------------------------------------------- | ------ | -------- | -------------------------------------------- |
| grant\_type    | <p>This key is constant and should always be completed for this API as "management\_client<br>\_credentials"</p> | String | Required | <p>"management\_client\_<br>credentials"</p> |
| client\_id     | The Client ID token from the UI received for authentication.                                                     | String | Required | <p>“677eXXXXXXcdcc3fd790<br>deb46duyud4”</p> |
| client\_secret | The Client Secret token from the UI received for authentication.                                                 | String | Required | “ghhjhiGHXXXXXX87686"                        |

### Example Request

```json
 {
   "grant_type": "management_client_credentials",
   "client_id": "677e6543049XXXXXXXXX0deb46d2ecd4",
   "client_secret": "d0iSLq5y6XXXXXuOyM4blm8GwzQb2sLOlcBtsI9KvBx9tGuucM2kvrdxXXXXXPjIunXbATQTkHDjHvVEVv1JgXFj0EUWmuNpNH53p9SnGWxwXXXXgdJSkCUDuHaDeFWHz-prMEGftXXXXXXfa_-8mRZURDZu2d_CRnwZ-Z51EnuFszgEP04f1AjcKTVhNSw0rXXXXXXdKaGZNM4EPsV5SxLBZKKdQxa3PPWL1Cb56U9ftviXPJKU47nAzXXXXXXXdfXKBsMCG2FX3nB7E2Eib_yHNK0EtXX4zFTr8uYRXXXXXXXCLMVRUxNjQ" 
 }
```

### Response Parameters

| Key         | Description                                                                | Type   | Required | Example                                                                                                                                                                              |
| ----------- | -------------------------------------------------------------------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| accessToken | Token to be used to authorize future requests                              | String | Required | <p>“eyJhbGciXXXXXXXXsInR5cCI6IkpXVC<br>J9.eyJpYXQiOjE2Mjg2NzI4OTMsImV4c<br>CI6MTYyODXXXXXXwiYXVkIjoibWFu<br>YWdlbWVudEFXXXXN1YiI6IjM2MiJ9.<br>cjx3AgYcI0XXXXYkVsO6F\_7M72lu\_p ”</p> |
| tokenType   | Only bearer token type is available                                        | String | Required | “bearer”                                                                                                                                                                             |
| expiresIn   | The number of seconds for which the token is valid (3600 seconds = 1 hour) | String | Required | 3600                                                                                                                                                                                 |

### Example Response

```json
{
  "accessToken": "eyJhbGciXXXXXiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2Mjg2NzI4OTMsIXXXXXXXODY3NjQ5MywiYXfdheibWFuYWdlbWVuXXXXXXXnN1YiI6IjM2MiJ9.cjx3AgYcI0w5qG0YkVsO6F_7M72lu_pqSqtXXXXXU",
  "tokenType": "bearer",
  "expiresIn": 3600
}
```


# App Level

Here you can find the endpoints and parameters for Apps, using the DT Management API.

### Get App/Apps

**Description**

Return the app's saved configuration by App ID.

Return all apps (of a single user)

**Method**

`GET https://console.fyber.com/api/management/v1/app?appId=`

`GET https://console.fyber.com/api/management/v1/app?publisherId=`

**Headers**

```
ContentType: application/json Authorization: Bearer <Access Token from Authentication Response>
```

#### Request Parameters

| Key         | Description             | Type   | Required | Example |
| ----------- | ----------------------- | ------ | -------- | ------- |
| appId       | The ID of the app       | Number | Required | 1070709 |
| publisherId | The ID of the publisher | Number | Required | 4       |

#### Example Request

```
https://console.fyber.com/api/management/v1/app?appId=170709
```

When a boolean field is left empty, the value of the empty string is automatically parsed as false.

#### Response Parameters

| Key                     | Description                                                                                      | Type    | Example                                                                                                                         |
| ----------------------- | ------------------------------------------------------------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------- |
| appId                   | DT App ID                                                                                        | String  | “170709”                                                                                                                        |
| publisherId             | DT Publisher ID                                                                                  | String  | “3432”                                                                                                                          |
| name                    | The name of the app                                                                              | String  | “CashCrash”                                                                                                                     |
| bundle                  | App's android bundle or iOS Store ID                                                             | String  | “com.cash\_crash.54”                                                                                                            |
| status                  | <p>The status of the app.<br>Can be either "active" or "inactive"</p>                            | String  | “active”                                                                                                                        |
| platform                | App's platform (Android or iOS)                                                                  | String  | "android"                                                                                                                       |
| storeURL                | App's store URL                                                                                  | String  | <p>“<https://play.google.com/store><br>/apps/details?id=com.<br>bKash.customerapp“</p>                                          |
| category1               | App's first store category                                                                       | String  | "Business"                                                                                                                      |
| category2               | App's second store category                                                                      | String  | "Finance"                                                                                                                       |
| coppa                   | Children's Online Privacy Protection Act. Is the app directed to children under 13 years of age? | Boolean | false                                                                                                                           |
| rewardedAdUrl           | URL to be used for server-side callbacks on app's rewarded placements                            | String  | <p>"<https://mygamesdomain>.<br>com/callbacks.aspx?user\_id={{USER\_ID}}\&reward\_amount={{AMOUNT}}<br>\&signature={{SIG}}"</p> |
| rewardedAdSecurityToken |                                                                                                  | String  | <p>“036xxxx5027e12c00f85a<br>4cbec3d1XXXXXa608cc<br>573a3482bXXXXX1164b8<br>64169”</p>                                          |

#### Example Response

```json
{
    "appId": "170709",
    "publisherId": "4",
    "name": "bKash",
    "bundle": "com.bKash.customerapp",
    "status": "active",
    "platform": "android",
    "storeUrl": "https://play.google.com/store/apps/details?id=com.bKash.customerapp",
    "category1": "Finance",
    "category2": "APPLICATION",
    "coppa": false,
    "rewardedAdUrl": "https://mygamesdomain.com/callbacks.aspx?user_id={{USER_ID}}&reward_amount={{AMOUNT}}&signature={{SIG}}",
    "rewardedAdSecurityToken": "036ae5027XXXXXXXXX161a632a608cc573a3482b9c1XXXXX4b864169"
}
```

### Create an App

**Method**

`POST https://console.fyber.com/api/management/v1/app`

**Headers**

```
ContentType: application/json Authorization: Bearer <Access Token from Authentication Response>
```

#### Request Parameters

| Key           | Description                                                                                      | Type   | Required | Example                                                                                                                          |
| ------------- | ------------------------------------------------------------------------------------------------ | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------- |
| name          | The name of the app                                                                              | String | Required | "CashCrash"                                                                                                                      |
| bundle        | App's Android bundle or iOS Store ID                                                             | String | Required | "com.cash\_crash.54"                                                                                                             |
| platform      | App's platform (Android or iOS)                                                                  | String | Required | "android"                                                                                                                        |
| category1     | App's first store category                                                                       | String | Required | "business"                                                                                                                       |
| coppa         | Children's Online Privacy Protection Act. Is the app directed to children under 13 years of age? | String | Required | false                                                                                                                            |
| rewardedAdUrl | URL to be used for server side call back on app’s rewarded placements                            | String | Optional | <p>"<https://mygameesdomain.com><br>/callbacks.aspx?user\_id={{USER\_ID}}\&reward\_amount<br>={{AMOUNT}}\&signature={{SIG}}"</p> |
| category2     | App’s second store category                                                                      | String | Optional | “Finance”                                                                                                                        |

#### Example Request

```json
{
  "publisherId": "3432",
  "status": "active",
  "name": "CashCrash",
  "coppa": true,
  "platform": "ios",
  "category1": "Books",
  "category2": "Business",
  "bundle": "com.cash_crash.54",
  "rewardedAdUrl": "https://mygameesdomain.com/callbacks.aspx?user_id={{USER_ID}}&reward_amount={{AMOUNT}}&signature={{SIG}}"
}
```

#### Response Parameters

| Key                     | Description                                                                                      | Type    | Example                                                                                                                              |
| ----------------------- | ------------------------------------------------------------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| appId                   | DT App ID                                                                                        | String  | “170709”                                                                                                                             |
| publisherId             | DT Publisher ID                                                                                  | String  | “3432”                                                                                                                               |
| name                    | The name of the App                                                                              | String  | “CashCrash”                                                                                                                          |
| bundle                  | App’s Android bundle or iOS store ID                                                             | String  | “com.cash\_crash.54”                                                                                                                 |
| status                  | <p>The status of the app.<br>Can be either "active" or "inactive"</p>                            | String  | “active”                                                                                                                             |
| platform                | App’s platform (Android or iOS)                                                                  | String  | “android”                                                                                                                            |
| storeURL                | App’s store URL                                                                                  | String  | <p>“<https://play.google.com/store><br>/apps/details?id=com.bKash.<br>customerapp“</p>                                               |
| category1               | App’s first store category                                                                       | String  | “Business”                                                                                                                           |
| category2               | App’s second store category                                                                      | String  | "Finance"                                                                                                                            |
| coppa                   | Children's Online Privacy Protection Act. Is the app directed to children under 13 years of age? | Boolean | False                                                                                                                                |
| rewardedAdUrl           | URL to be used for server side call back on app’s rewarded placements                            | String  | <p>"<https://mygameesdomain.com/><br>callbacks.aspx?user\_id={{USER\_ID}}<br>\&reward\_amount={{AMOUNT}}<br>\&signature={{SIG}}"</p> |
| rewardedAdSecurityToken |                                                                                                  | String  | <p>“000096ae5027e12c00f<br>85a4XXXXXX3d161a632<br>a608ccXXXXXX82b9c<br>1151164b864169”</p>                                           |

#### Example Response

```json
{
  "appid": "170709",
  "publisherId": "4",
  "name": "CashCrash",
  "bundle": "com.cash_crash.54",
  "status": "active",
  "platform": "ios",
  "storeUrl": "",
  "category1": "Books",
  "category2": "Business",
  "coppa": true,
  "rewardedAdUrl": "https://mygameesdomain.com/callbacks.aspx?user_id={{USER_ID}}&reward_amount={{AMOUNT}}&signature={{SIG}}",
  "rewardedAdSecurityToken": "d613c47d081eXXXXXXXXXXf19f90a197ba4b5057556493f1e5759b14c"
}
```

### Update an App

**Description**

Update an existing app.

**Method**

`PUT https://console.fyber.com/api/management/v1/app`

**Headers**

```
ContentType: application/json Authorization: Bearer <Access Token from Authentication Response>
```

#### Request Parameters

| Key           | Description                                                                                      | Type    | Required | Example                                                                                                                      |
| ------------- | ------------------------------------------------------------------------------------------------ | ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------- |
| appId         | DT App ID                                                                                        | String  | Required | "170709"                                                                                                                     |
| status        | <p>The status of the app.<br>Can be either "active" or "inactive"</p>                            | String  | Optional | "active"                                                                                                                     |
| coppa         | Children's Online Privacy Protection Act. Is the app directed to children under 13 years of age? | Boolean | Optional | true                                                                                                                         |
| rewardedAdUrl | URL to be used for server-side call back on app's rewarded placements                            | String  | Optional | <p>"<https://mygameesdomain.com><br>/callbacks.aspx?user\_id={{USER\_ID}}\&reward\_amount={{AMOUNT}}\&signature={{SIG}}"</p> |

#### Example Request

```json
{
  "appId": "178505",
  "coppa": true,
  "status": "inactive",
  "rewardedAdUrl": "https://check546745674.com/callbacks.aspx?user_id={{USER_ID}}&reward_amount={{AMOUNT}}&signature={{SIG}}"
}
```

### Delete an App

**Description**

Delete an existing app.

**Method**

`DELETE https://console.fyber.com/api/management/v1/app`

**Headers**

```
ContentType: application/json Authorization: Bearer <Access Token from Authentication Response>
```

#### Request Parameters

| Key   | Description       | Required | Type   |
| ----- | ----------------- | -------- | ------ |
| appId | The ID of the app | Required | String |

#### Example Request

```json
{ "appId": "123123" }
```

#### Example Response

```json
{ "message": "App 178441 has been deleted successfully." }
```


# Placement Level

Here you can find the endpoints and parameters for Placements, using the DT Management API.

### Get Placement / Placements

**Description**

Return the placement’s configuration by placement ID.

Return all placements of a single app.

**Method**

`GET https://console.fyber.com/api/management/v1/placement?placementId=`

`GET https://console.fyber.com/api/management/v1/placement?appId=`

**Headers**

```
ContentType: application/json Authorization: Bearer <Access Token from Authentication Response>
```

Request Parameters

| Key         | Description             | Type   | Required | Example |
| ----------- | ----------------------- | ------ | -------- | ------- |
| placementId | The ID of the Placement | Number | Required | 10804   |
| appId       | The ID of the app       | Number | Required | 170709  |

#### Example Request

```
https://console.fyber.com/api/management/v1/placement?placementId=10804
```

#### Response Parameters

| Key                                                        | Description                                                                                                                    | Type                                                        | Example                                                                               |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| placementId                                                | The ID of the Placement                                                                                                        | String                                                      | “24542”                                                                               |
| status                                                     | <p>The status of the placement.<br>Can be either "active" or "inactive"</p>                                                    | String                                                      | "active"                                                                              |
| name                                                       | The name of the Placement                                                                                                      | String                                                      | "int\_13"                                                                             |
| appId                                                      | The ID of the Placement's app                                                                                                  | String                                                      | "12345"                                                                               |
| placementType                                              | The Placement type ("Banner", "Rewarded", "Interstitial", "MREC")                                                              | String                                                      | "Banner"                                                                              |
| coppa                                                      | Children's Online Privacy Protection Act. Is the app directed to children under 13 years of age?                               | Boolean                                                     | false                                                                                 |
| <p>createTypes<br>(<strong>Interstitial only</strong>)</p> | Allowed creative types for interstitial Placement                                                                              | String array                                                | \["video", "display"]                                                                 |
| <p>bannerRefresh<br>(<strong>Banner only</strong>)</p>     | Set the Refresh Interval for the app banner placement. This determines the frequency in which a banner placement is refreshed. | Number                                                      | 45                                                                                    |
| floorPrices                                                | The minimal price at which you are willing to sell your inventory. By default, it is set to $0.01 for all countries.           | Object array (country: string, price: number)               | <p>\[{<br>“country”: “WW”, “price”: 0.01 },{ “country”: “IL”, “price”: 0.05<br>}]</p> |
| targetingEnabled                                           | Enable audience targeting by countries or connection type                                                                      | Boolean                                                     | true                                                                                  |
| geo                                                        | Geo target countries                                                                                                           | Object (include: boolean, countries: string array)          | <p>{<br>"countries": \[<br>"BT",<br>"SG" ],<br>"include": true<br>}</p>               |
| connectivity                                               | Targeted connection type (“Cellular”, “WIFI”)                                                                                  | String array                                                | \[“WIFI”]                                                                             |
| capping                                                    | <p>\*only if enabled=true<br><br>Limit the number of impressions per second / minute / day</p>                                 | Object (value: number, unit: string, enabled: boolean)      | { "value": 12, "unit": "minute", "enabled": true }                                    |
| pacing                                                     | <p>\*only if enabled=true<br><br>Set the pace for the maximum number of ad impressions per second / miמute / day / hour</p>    | Object (value: number, unit: string, enabled: boolean)      | <p>{<br>"value": 12,<br>"unit": "minute", "enabled": true<br>}</p>                    |
| <p>ssrConfig<br>(<strong>Rewarded only</strong>)</p>       | \*only if enabled=true                                                                                                         | Object (currency: string, amount: number, enabled: boolean) | <p>{"currency": "dollars",<br>"amount": 3456, "enabled": true<br>}</p>                |
| skipability                                                | Ads can be skippable or non-skippable                                                                                          | String                                                      | "NonSkippable"                                                                        |

#### Response Example

```json
{
  "placementId": "10804",
  "name": "Rewarded Placement",
  "appId": "170709",
  "placementType": "Rewarded",
  "status": "active",
  "coppa": true,
  "rewardedConfig": {
    "id": "",
    "currency": {
      "id": "dollars",
      "appId": "",
      "currency": "dollars"
    },
    "amount": 3456,
    "rewardingType": "server",
    "placementId": ""
  },
  "floorPrices": [
    {
      "country": "AF",
      "price": 0.05
    },
    {
      "country": "SG",
      "price": 0.03
    },
    {
      "country": "WW",
      "price": 0.01
    }
  ],
  "targetingEnabled": true,
  "geo": {
    "include": true,
    "countries": [
      "BT"
    ]
  },
  "capping": {
    "value": 12,
    "unit": "minute",
    "enabled": true
  },
  "pacing": {
    "value": 13,
    "unit": "second",
    "enabled": true
  }
}
```

### Create a Placement

**Description**

Create a new placement

**Method**

`POST https://console.fyber.com/api/management/v1/placement`

**Headers**

```
ContentType: application/json Authorization: Bearer <Access Token from Authentication Response>
```

#### Request Parameters

| Key                                                          | Description                                                                                                                    | Type                                                        | Required | Example                                                                  |
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------- | -------- | ------------------------------------------------------------------------ |
| name                                                         | The name of the placement                                                                                                      | String                                                      | Required | "int\_13"                                                                |
| appId                                                        | The ID of the placement's app                                                                                                  | String                                                      | Required | "12345"                                                                  |
| placementType                                                | The placement type ("Banner", "Rewarded", "Interstitial", "MREC")                                                              | String                                                      | Required | "Rewarded"                                                               |
| coppa                                                        | Children's Online Privacy Protection Act. Is the app directed to children under 13 years of age?                               | Boolean                                                     | Required | false                                                                    |
| <p>creativeTypes<br>(<strong>Interstitial only</strong>)</p> | Allowed creative types for interstitial placement                                                                              | String array                                                | Optional | \[“video”, “display״]                                                    |
| <p>bannerRefresh<br>(<strong>Banner only</strong>)</p>       | Set the Refresh Interval for the app banner placement. This determines the frequency in which a banner placement is refreshed. | Number                                                      | Optional | 45                                                                       |
| floorPrices                                                  | The minimal price at which you are willing to sell your inventory. By default, it is set to $0.01 for all countries.           | Object Array (country: string, price: number)               | Optional | \[{ “country”: “WW”, “price”: 0.01 },{ “country”: “IL”, “price”: 0.05 }] |
| targetingEnabled                                             | Enable audience targeting by countries or connection type                                                                      | Boolean                                                     | Optional | true                                                                     |
| geo                                                          | Geo target countries \*only if targetingEnabled=true                                                                           | Object (include: boolean, countries: string array)          | Optional | { "countries": \["BT", "SG" ], "include": true }                         |
| connectivity                                                 | Targeted connection type (“Cellular”, “WIFI”) \*\*only if targetingEnabled=true                                                | String array                                                | Optional | \[“WIFI”]                                                                |
| capping                                                      | <p>\*only if enabled=true<br><br>Limit the number of impressions per second / minute / day</p>                                 | Object (value: number, unit: string, enabled: boolean)      | Optional | <p>{ "value": 12,<br>"unit": "minute", "enabled": true<br>}</p>          |
| pacing                                                       | <p>\*only if enabled=true<br><br>Set the pace for the maximum number of ad impressions per second / miמute / day / hour</p>    | Object (value: number, unit: string, enabled: boolean)      | Optional | <p>{<br>"value": 12,<br>"unit": "minute", "enabled": true<br>}</p>       |
| <p>ssrConfig<br>(<strong>Rewarded only</strong>)</p>         | \*only if enabled=true                                                                                                         | Object (currency: string, amount: number, enabled: boolean) | Optional | <p>{"currency": "dollars",<br>"amount": 3456, "enabled": true<br>}</p>   |
| skipability                                                  | Ads can be skippable or non-skippable                                                                                          | String                                                      | Optional | "NonSkippable"                                                           |

Example Request

```json
{
  "name": "int_13",
  "appId": "12345",
  "placementType": "Rewarded",
  "coppa": true,
  "ssrConfig": {
    "currency": "dollars",
    "amount": 3456,
    "enabled": true
  },
  "targetingEnabled": true,
  "geo": {
    "countries": [
      "BT",
      "SG"
    ],
    "include": true
  },
  "connectivity": [
    "WIFI"
  ],
  "floorPrices": [
    {
      "price": 0.05,
      "country": "AF"
    },
    {
      "price": 0.03,
      "country": "SG"
    }
  ],
  "capping": {
    "value": 12,
    "unit": "minute",
    "enabled": true
  },
  "pacing": {
    "value": 13,
    "unit": "second",
    "enabled": true
  }
}
```

#### Response Parameters

| Key                                                          | Description                                                                                                                    | Type                                                             | Example                                                                               |
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| placementId                                                  | The ID of the newly created placement                                                                                          | String                                                           | “24542”                                                                               |
| status                                                       | <p>The status of the placement.<br>Can be either "active" or "inactive"</p>                                                    | String                                                           | “active”                                                                              |
| name                                                         | The name of the placement                                                                                                      | String                                                           | “int\_13”                                                                             |
| appId                                                        | The ID of the placement's app                                                                                                  | String                                                           | “12354”                                                                               |
| placementType                                                | The placement type ("Banner", "Rewarded" or "Interstitial", "MREC")                                                            | String                                                           | “Banner”                                                                              |
| coppa                                                        | Children's Online Privacy Protection Act. Is the app directed to children under 13 years of age?                               | Boolean                                                          | false                                                                                 |
| <p>creativeTypes<br>(<strong>Interstitial only</strong>)</p> | Allowed creative types for interstitial placement                                                                              | String Array                                                     | \[“video”, “display״]                                                                 |
| <p>bannerRefresh<br>(<strong>Banner only</strong>)</p>       | Set the Refresh Interval for the app banner placement. This determines the frequency in which a banner placement is refreshed. | Number                                                           | 45                                                                                    |
| floorPrices                                                  | The minimal price at which you are willing to sell your inventory. By default, it is set to $0.01 for all countries.           | Object array (country: string, price: number)                    | <p>\[{<br>“country”: “WW”, “price”: 0.01 },{ “country”: “IL”, “price”: 0.05<br>}]</p> |
| targetingEnabled                                             | Enable audience targeting by countries or connection type                                                                      | Boolean                                                          | true                                                                                  |
| geo                                                          | Geo target countries                                                                                                           | Object (include: boolean, countries: string array)               | <p>{<br>"countries": \[<br>"BT",<br>"SG" ],<br>"include": true<br>}</p>               |
| connectivity                                                 | Targeted connection type ("Cellular" or "WIFI")                                                                                | String array                                                     | \[“WIFI”]                                                                             |
| capping                                                      | <p>\*only if enabled=true<br><br>Limit the number of impressions per second / minute / day</p>                                 | Object (value: number, unit: string, enabled" boolean)           | <p>{ "value": 12,<br>"unit": "minute", "enabled": true<br>}</p>                       |
| pacing                                                       | <p>\*only if enabled=true<br><br>Set the pace for the maximum number of ad impressions per second / miמute / day / hour</p>    | Object (value: number, unit: string, enabled" boolean)           | <p>{ "value": 12,<br>"unit": "minute",<br>"enabled": true<br>}</p>                    |
| <p>ssrConfig<br>(<strong>Rewarded only</strong>)</p>         | \*only if enabled=true                                                                                                         | Object (currency: unit: string, amount, number enabled" boolean) | <p>{"currency": "dollars",<br>"amount": 3456, "enabled": true<br>}</p>                |
| skipability                                                  | Ads can be skippable or non-skippable                                                                                          | String                                                           | "NonSkippable"                                                                        |

#### Example Response

```json
{
  "PlacementId": "245254",
  "name": "Rewarded Placement",
  "appId": "170709",
  "placementType": "Rewarded",
  "status": "active",
  "coppa": true,
  "rewardedConfig": {
    "id": "",
    "currency": {
      "id": "dollars",
      "appId": "",
      "currency": "dollars"
    },
    "amount": 3456,
    "rewardingType": "server",
    "placementId": ""
  },
  "floorPrices": [
    {
      "country": "AF",
      "price": 0.05
    },
    {
      "country": "SG",
      "price": 0.03
    },
    {
      "country": "WW",
      "price": 0.01
    }
  ],
  "targetingEnabled": true,
  "geo": {
    "include": true,
    "countries": [
      "BT"
    ]
  },
  "capping": {
    "value": 12,
    "unit": "minute",
    "enabled": true
  },
  "pacing": {
    "value": 13,
    "unit": "second",
    "enabled": true
  }
}
```

### Update a Placement

**Description**

Update an existing placement by Placement ID.

**Method**

`PUT https://console.fyber.com/api/management/v1/placement`

**Headers**

```
ContentType: application/json Authorization: Bearer <Access Token from Authentication Response>
```

#### Request Parameters

| Key                                                          | Description                                                                                                                    | Type                                                             | Required | Example                                                                  |
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------- | -------- | ------------------------------------------------------------------------ |
| placementId                                                  | The ID of the placement                                                                                                        | String                                                           | Required | "123123"                                                                 |
| status                                                       | <p>The status of the placement.<br>Can be either "active" or "inactive"</p>                                                    | String                                                           | Optional | "active"                                                                 |
| name                                                         | The name of the placement                                                                                                      | String                                                           | Optional | "int\_13"                                                                |
| coppa                                                        | Children's Online Privacy Protection Act. Is the app directed to children under 13 years of age?                               | Boolean                                                          | Optional | false                                                                    |
| <p>creativeTypes<br>(<strong>Interstitial only</strong>)</p> | Allowed creative types for Interstitial placement                                                                              | String array                                                     | Optional | \[“video”, “display״]                                                    |
| <p>bannerRefresh<br>(<strong>Banner only</strong>)</p>       | Set the Refresh Interval for the app banner placement. This determines the frequency in which a banner placement is refreshed. | Number                                                           | Optional | 45                                                                       |
| floorPrices                                                  | The minimal price at which you are willing to sell your inventory. By default, it is set to $0.01 for all countries.           | Object array (country: string, price: number)                    | Optional | \[{ “country”: “WW”, “price”: 0.01 },{ “country”: “IL”, “price”: 0.05 }] |
| targetingEnabled                                             | Enable audience targeting by countries or connection type                                                                      | Boolean                                                          | Optional | true                                                                     |
| geo                                                          | Geo target countries \*only if targetingEnabled=true                                                                           | Object (include: boolean, countries: string array)               | Optional | { "countries": \[ "BT", "SG" ], "include": true }                        |
| connectivity                                                 | <p>Targeted connection type ("Cellular" or "WIFI")<br>\*only if targetingEnabled=true</p>                                      | String array                                                     | Optional | \[“WIFI”]                                                                |
| capping                                                      | <p>\*only if enabled=true<br><br>Limit the number of impressions per second / minute / day</p>                                 | Object (value: number, unit: string, enabled" boolean)           | Optional | { "value": 12, "unit": "minute", "enabled": true }                       |
| pacing                                                       | <p>\*only if enabled=true<br><br>Set the pace for the maximum number of ad impressions per second / miמute / day / hour</p>    | Object (value: number, unit: string, enabled" boolean)           | Optional | { "value": 12, "unit": "minute", "enabled": true }                       |
| <p>ssrConfig<br>(<strong>Rewarded only</strong>)</p>         | \*only if enabled=true                                                                                                         | Object (currency: unit: string, amount, number enabled" boolean) | Optional | {"currency": "dollars", "amount": 3456, "enabled": true }                |
| skipability                                                  | Ads can be skippable or non-skippable                                                                                          | String                                                           | Optional | "NonSkippable"                                                           |

#### Example Request

```json
{
  "placementId": "12345",
  "name": "updated_name",
  "status": "active",
  "coppa": true,
  "ssrConfig": {
    "currency": "dollars",
    "amount": 3456,
    "enabled": true
  },
  "targetingEnabled": true,
  "geo": {
    "countries": ["BT", "SG"],
    "include": true
  },
  "connectivity": ["WIFI"],
  "floorPrices": [
    {
      "price": 0.05,
      "country": "AF"
    },
    {
      "price": 0.03,
      "country": "SG"
    }
  ],
  "capping": {
    "value": 12,
    "unit": "minute",
    "enabled": true
  },
  "pacing": {
    "value": 13,
    "unit": "second",
    "enabled": true
  }
}
```

#### Response Parameters

| Key                                                          | Description                                                                                                                    | Type                                                             | Example                                                                                     |
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| placementId                                                  | The ID of the newly created placement                                                                                          | String                                                           | "24542"                                                                                     |
| status                                                       | <p>The status of the placement.<br>Can be either "active" or "inactive"</p>                                                    | String                                                           | "active"                                                                                    |
| name                                                         | The name of the placement                                                                                                      | String                                                           | "int\_13"                                                                                   |
| appId                                                        | The ID of the placement's app                                                                                                  | String                                                           | "12345"                                                                                     |
| placementType                                                | The placement type ("Banner", "Rewarded", "Interstitial", "MREC")                                                              | String                                                           | "Banner"                                                                                    |
| coppa                                                        | Children's Online Privacy Protection Act. Is the app directed to children under 13 years of age?                               | Boolean                                                          | false                                                                                       |
| <p>creativeTypes<br>(<strong>Interstitial only</strong>)</p> | Allowed creative types for Interstitial placement                                                                              | String array                                                     | \[“video”, “display״]                                                                       |
| <p>bannerRefresh<br>(<strong>Banner only</strong>)</p>       | Set the Refresh Interval for the app banner placement. This determines the frequency in which a banner placement is refreshed. | Number                                                           | 45                                                                                          |
| floorPrices                                                  | The minimal price at which you are willing to sell your inventory. By default, it is set to $0.01 for all countries.           | Object array (country: string, price: number)                    | <p>\[{<br>“country”: “WW”, “price”: 0.01<br>},{<br>“country”: “IL”, “price”: 0.05<br>}]</p> |
| targetingEnabled                                             | Enable audience targeting by countries or connection type                                                                      | Boolean                                                          | true                                                                                        |
| geo                                                          | Geo target countries \*only if targetingEnabled=true                                                                           | Object (include: boolean, countries: string array)               | <p>{<br>"countries": \[<br>"BT", "SG" ], "include": true<br>}</p>                           |
| connectivity                                                 | <p>Targeted connection type ("Cellular" or "WIFI")<br>\*only if targetingEnabled=true</p>                                      | String array                                                     | \[“WIFI”]                                                                                   |
| capping                                                      | <p>\*only if enabled=true<br><br>Limit the number of impressions per second / minute / day</p>                                 | Object (value: number, unit: string, enabled" boolean)           | <p>{<br>"value": 12,<br>"unit": "minute", "enabled": true<br>}</p>                          |
| pacing                                                       | <p>\*only if enabled=true<br><br>Set the pace for the maximum number of ad impressions per second / miמute / day / hour</p>    | Object (value: number, unit: string, enabled" boolean)           | <p>{<br>"value": 12,<br>"unit": "minute", "enabled": true<br>}</p>                          |
| <p>ssrConfig<br>(<strong>Rewarded only</strong>)</p>         | \*only if enabled=true                                                                                                         | Object (currency: unit: string, amount, number enabled" boolean) | <p>{"currency": "dollars",<br>"amount": 3456, "enabled": true<br>}</p>                      |
| skipability                                                  | Ads can be skippable or non-skippable                                                                                          | String                                                           | "NonSkippable"                                                                              |

#### Example Response

```json
{
  "placementId": "243713",
  "name": "changedBanner",
  "appId": "170709",
  "placementType": "Banner",
  "status": "active",
  "coppa": false,
  "bannerRefresh": 88,
  "floorPrices": [
    {
      "country": "WW",
      "price": 0.01
    }
  ],
  "targetingEnabled": false
}
```

### Delete a Placement

**Description**

Delete an existing placement.

**Method**

`DELETE https://console.fyber.com/api/management/v1/placement`

**Headers**

```
ContentType: application/json Authorization: Bearer <Access Token from Authentication Response>
```

#### Request Parameters

| Key         | Description             | Required | Type   |
| ----------- | ----------------------- | -------- | ------ |
| placementId | The ID of the placement | Required | String |

#### Example Request

```json
{ "placementId": "123123" }
```

#### Example Response

```json
{ "message": "Placement 123123 has been deleted successfully." }
```


# SDK Bidding Process

The following diagram provides an overview of the SDK bidding process:

```mermaid
sequenceDiagram
participant MediationSDK as Mediation SDK
participant MediationBackend as Mediation Backend
participant DTExchangeSDK as DT Exchange SDK
participant DTExchangeBackend as DT Exchange Backend
autonumber
MediationSDK ->> DTExchangeSDK: Initialize and request a Token
   DTExchangeSDK -->> MediationSDK: Provide Token
   MediationSDK ->> MediationBackend: Pass Token
   MediationBackend ->> DTExchangeBackend: OpenRTB Bid Request (with Token)
   DTExchangeBackend ->>  DTExchangeBackend: Perform OpenRTB auction among DSPs
   DTExchangeBackend -->> MediationBackend: OpenRTB Bid Response (winning bid)
   MediationBackend ->> MediationBackend: Perform second auction&lt<br> (DTX Winning Bid vs. Other Networks)
   alt DT Exchange Wins
       MediationBackend ->> DTExchangeBackend: Send Win Notification (with macros)
       MediationBackend ->> DTExchangeSDK: Send winning bid for rendering
       DTExchangeSDK ->> MediationSDK: Impression happened
       MediationSDK ->> MediationBackend: Impression detected
       MediationBackend ->> DTExchangeBackend: Send Billing Notification
   else DT Exchange Loses
       MediationBackend ->> DTExchangeBackend: Send Loss Notification (with macros)
   end
```

## Bidding Process

1. **Initiating the Bid Request:** The Mediation SDK begins the process by requesting a unique identification token from the DT Exchange SDK, which is a key part of setting up the ad request.
2. **Receiving a Security Token:** The DT Exchange SDK provides the requested token back to the Mediation SDK to confirm its identity. For more information about generating a token, see Fetching the Ad for SDK Bidding ([Android docs](/dt-exchange/sdk-configuration/integrating-the-android-sdk/android-ad-formats), [iOS docs](/dt-exchange/sdk-configuration/integrating-the-ios-sdk/ios-ad-formats)).
3. **Forwarding the Token:** The Mediation SDK sends this token to its server-side component, the Mediation Backend, which will handle the rest of the bid process.
4. **Creating a Bid Request:** The Mediation Backend creates and sends an OpenRTB bid request to the DT Exchange Backend. This request includes the security token and other relevant information for the ad placement. For more information, see [Bid Request Specifications](/dt-exchange/getting-started-with-dt-exchange/sdk-bidding-process/sdk-bidding-guidelines#h_01k6nysk3tgvkg1m3gwf6apxgy).
5. **Running an Internal Auction:** The DT Exchange Backend receives the bid request and runs an internal OpenRTB auction among its network of Demand-Side Platforms (DSPs) to find the best ad.
6. **Sending the Winning Bid:** After the auction concludes, the DT Exchange Backend sends the highest bid response, including the creative and price, back to the Mediation Backend. For more information, see [Bid Response Specifications](/dt-exchange/getting-started-with-dt-exchange/sdk-bidding-process/sdk-bidding-guidelines#h_01k6nysk3tbxf1gpv908v3f3nj).
7. **Conducting a Final Auction:** The Mediation Backend then performs a secondary auction, comparing the winning bid from DT Exchange against bids from all other ad networks to find the overall best bid.

#### Alternative 1: DT Exchange Wins <a href="#h_01k6jx9hsg7x69zy4z1kr72npk" id="h_01k6jx9hsg7x69zy4z1kr72npk"></a>

8. **Notifying of Win:** If the DT Exchange bid wins the final auction, the Mediation Backend notifies the DT Exchange Backend with a win notification that includes details about the successful bid. For more information, see the `seatbid.bid.nurl` attribute in the [Bid Response Specifications](/dt-exchange/getting-started-with-dt-exchange/sdk-bidding-process/sdk-bidding-guidelines#h_01k6nysk3tbxf1gpv908v3f3nj).
9. **Preparing to Render:** The Mediation Backend sends the winning ad creative from DT Exchange back to the DT Exchange SDK on the user's device, preparing it for display.
10. **Confirming Impression:** Once the ad is displayed to the user, the DT Exchange SDK notifies the Mediation SDK that an impression has occurred.
11. **Logging the Impression:** The Mediation SDK relays this impression notification to the Mediation Backend to log the event.
12. **Sending a Billing Confirmation:** The Mediation Backend sends a final billing notification to the DT Exchange Backend to complete the transaction for the winning ad impression. For more information, see the `seatbid.bid.burl` attribute in the [Bid Response Specifications](/dt-exchange/getting-started-with-dt-exchange/sdk-bidding-process/sdk-bidding-guidelines#h_01k6nysk3tbxf1gpv908v3f3nj).

#### Alternative 2: DT Exchange Loses <a href="#h_01k6jx9hsgq09w85tab27fnbat" id="h_01k6jx9hsgq09w85tab27fnbat"></a>

13. **Notifying of Loss:** If another network's bid is higher, the Mediation Backend sends a loss notification to the DT Exchange Backend, informing it that its bid was not selected. For more information, see the `seatbid.bid.lurl` attribute in the [Bid Response Specifications](/dt-exchange/getting-started-with-dt-exchange/sdk-bidding-process/sdk-bidding-guidelines#h_01k6nysk3tbxf1gpv908v3f3nj).


# SDK Bidding Guidelines

## SDK Bidding Guidelines

This article provides requirements for bid requests and responses for SDK Bidding with DT Exchange. For more information, see [DT Exchange SDK Bidding Process](/dt-exchange/getting-started-with-dt-exchange/sdk-bidding-process).

### Bid Request Specifications <a href="#h_01k6nysk3tgvkg1m3gwf6apxgy" id="h_01k6nysk3tgvkg1m3gwf6apxgy"></a>

DT expects to receive properly structured bid requests per the [IAB OpenRTB API](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) specification from the mediation platform. DT uses the following attributes along with an SDK-generated token that authenticates the bid request.

| ATTRIBUTE               | TYPE   | DESCRIPTION                                                                                                                                                    |
| ----------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `BidRequest.id`         | String | Unique ID for the bid request.                                                                                                                                 |
| `app.ext.token`         | String | Token generated by DT Exchange SDK for the bid request. The token can be as large as 6 kb.                                                                     |
| `BidRequest.tmax`       | String | Time to respond. To ensure DT Exchange can accept bids from as many bidders as possible, DT recommends setting the time to respond value at 1000 ms or longer. |
| `device.ip`             | String | IPv4 address closest to the device.                                                                                                                            |
| `device.ipv6`           | String | IPv6 address closest to the device.                                                                                                                            |
| `device.ua`             | String | User agent string containing device data.                                                                                                                      |
| `imp.displaymanager`    | String | Name of the ad mediation partner.                                                                                                                              |
| `imp.displaymanagerver` | String | Version of ad mediation partner.                                                                                                                               |
| `imp.bidfloor`          | String | Minimum bid price for the impression expressed in CPM. DT supports precision up to 5 digits.                                                                   |
| `imp.tagid`             | String | Placement ID.                                                                                                                                                  |

#### Example Bid Request <a href="#h_01k6nysk3tve32c4nw7ghzdjy0" id="h_01k6nysk3tve32c4nw7ghzdjy0"></a>

The following is an example of a bid request.

{% code title="JSON" %}

```json
{
  "id": "a97cc130-7387-11f0-9f5f-a1ac0196517a_1912357094",
  "imp": [
    {
      "id": "1",
      "banner": {
        "w": 1080,
        "h": 2112
      },
      "video": {
        "mimes": [
          "video/mp4"
        ],
        "w": 1080,
        "h": 2112,
        "linearity": 2
      },
      "instl": 1,
      "tagid": "2055013",
      "bidfloor": 0.01,
      "secure": 1,
      "ext": {
        "gpid": "q7nmm84lbmzqd64w"
      }
    }
  ],
  "app": {
    "bundle": "com.bundle.example",
    "ext": {
      "sessionDepth": 4,
      "token": "CgUKAzEuMhKnAQqkAU1vemlsbGEvNS4wIChMaW51eDsgQW5kcm9pZCAxNTsgU00tUzkyOE4gQnVpbGQvQVAzQS4yNDA5MDUuMDE1LkEyOyB3dikgQXBwbGVXZWJLaXQvN=="
    }
  },
  "device": {
    "ext": {
      "app_set_id": "1234567-78b1-bcdf-8b01-fbc738e142f3"
    },
    "os": "android",
    "ip": "127.0.0.0",
    "h": 2112,
    "language": "ko",
    "dnt": 0,
    "ua": "Mozilla/5.0 (Linux; Android 15; SM-S928N Build/AP3A.240905.015.A2; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/138.0.7204.179 Mobile Safari/537.36",
    "devicetype": 4,
    "geo": {
      "country": "KR"
    },
    "lmt": 0,
    "osv": "15",
    "w": 1080,
    "model": "SM-S928N",
    "connectiontype": 5,
    "make": "samsung",
    "ifa": "12345678-a489-1234-be0c-3625cf35b1be"
  },
  "user": {
    "ext": {
      "consent": "1"
    }
  },
  "test": 0,
  "at": 1,
  "tmax": 1500,
  "cur": [
    "USD"
  ],
  "source": {
    "tid": "a97cc130-7387-11f0-9f5f-a1ac0196517a_1912357094"
  },
  "regs": {}
}
```

{% endcode %}

### Bid Response Specifications <a href="#h_01k6nysk3tbxf1gpv908v3f3nj" id="h_01k6nysk3tbxf1gpv908v3f3nj"></a>

DT determines a winning bid and sends a bid response back to the mediation platform to compete against other mediated networks. The bid response follows the [IAB OpenRTB API](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) specification and contains the following attributes required for processing the bid and rendering the ad on the device:

| ATTRIBUTE           | TYPE   | DESCRIPTION                                                                                                                                                                                                                     |
| ------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `BidResponse.id`    | String | ID of the bid response, matching the bid request ID.                                                                                                                                                                            |
| `seatbid.bid.id`    | String | Bidder-generated ID for the bid.                                                                                                                                                                                                |
| `seatbid.bid.impid` | String | ID of the `imp` object in the related bid request.                                                                                                                                                                              |
| `seatbid.bid.price` | Float  | Bid price expressed as CPM, although the actual transaction is for a unit impression only.                                                                                                                                      |
| `seatbid.bid.adm`   | String | Ad markup to be rendered. This is a hashed value to be passed to the SDK.                                                                                                                                                       |
| `seatbid.bid.nurl`  | String | Win notice URL to call when a bid wins. The nURL supports substitution macros. For more information, see [Supported Macros](#biddingmacros).                                                                                    |
| `seatbid.bid.lurl`  | String | Loss notice URL to call when a bid is lost. The lURL supports substitution macros. For more information, see [Supported Macros](#biddingmacros).                                                                                |
| `seatbid.bid.burl`  | String | Billing notice URL to call when a billable event occurs. When forwarding bURL notifications through proxy servers, use the `X‑Forwarded‑For` and `User‑Agent` headers to preserve details about the proxy chain and user agent. |

#### Supported Macros <a href="#biddingmacros" id="biddingmacros"></a>

DT supports the following substitution macros for event notifications.

**nURL Substitution Macros**

| MACRO                | nURL PARAMETER | DESCRIPTION                                           | EXAMPLE                        |
| -------------------- | -------------- | ----------------------------------------------------- | ------------------------------ |
| `AUCTION_PRICE`      | `price`        | The final price to be paid on impression.             | `price=${AUCTION_PRICE}`       |
| `AUCTION_BID_TO_WIN` | `minBid`       | The minimum bid that was required to win the auction. | `minBid=${AUCTION_BID_TO_WIN}` |

**lURL Substitution Macros**

| MACRO           | lURL PARAMETER | DESCRIPTION                                                                                              | EXAMPLE                    |
| --------------- | -------------- | -------------------------------------------------------------------------------------------------------- | -------------------------- |
| `AUCTION_LOSS`  | `lossCode`     | The loss reason code, indicating why the bid lost the auction, for example, lost on price, timeout, etc. | `lossCode=${AUCTION_LOSS}` |
| `AUCTION_PRICE` | `price`        | The final winning price to be paid on impression.                                                        | `price=${AUCTION_PRICE}`   |

#### Ad Expiration <a href="#h_01k729ktgnkqdwdsa7gf397y6c" id="h_01k729ktgnkqdwdsa7gf397y6c"></a>

DT sets the following time limits for rendering an ad. After these times elapse, the impression is not billable:

* Banner: 30 minutes
* Interstitial: 60 minutes
* Rewarded: 60 minutes

#### Example Bid Response <a href="#h_01k6nysk3vxdhbqtdynxkf4dm6" id="h_01k6nysk3vxdhbqtdynxkf4dm6"></a>

{% code title="JSON" %}

```json

{
  "id": "521d96b0-7389-11f0-a14d-fb5de7745fe3_1123125237",
  "seatbid": [
    {
      "bid": [
        {
          "id": "8531704193319338877",
          "price": 1.0382123166023163,
          "nurl": "https://notifications-gke-sdk-bidding-a.fyber.com/nurl/{mediationName}?s=8531704193319338877&persister=new&deploymentEnv=SDKBidding&price=${AUCTION_PRICE}&minBid=${AUCTION_BID_TO_WIN}&adTime=1754569407912",
          "burl": "https://notifications-gke-sdk-bidding-a.fyber.com/burl/{mediationName}?s=8531704193319338877&persister=new&deploymentEnv=SDKBidding&adTime=1754569407912",
          "lurl": "https://notifications-gke-sdk-bidding-a.fyber.com/lurl/{mediationName}?s=8531704193319338877&persister=new&deploymentEnv=SDKBidding&lossCode=${AUCTION_LOSS}&price=${AUCTION_PRICE}&adTime=1754569407912",
          "adm": "hODVkNDkyLWE0ODktNDUyMS1iZTBjLTM2MjVjZjM1bDEbZcIDAwjuAuIDAggA+gMwChNmbXBfZW5kY2FyZF9hbmRyb2lkEhlGbXBFbmRjYXJkRW5hYmxlZF92MS4xLjE0+gM9Chp2aWRlb19jbGlja2Fia==",
          "ext": {
            "test": 0
          }
        }
      ]
    }
  ]
}
```

{% endcode %}

### HTTP Configuration

Use the following HTTP configuration for SDK Bidding with DT Exchange:

| SETTING          | CONFIGURATION                                                                                                                                                                                                                                                            |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Host URL         | `bidding.fyber.com`                                                                                                                                                                                                                                                      |
| Bidding Endpoint | <p><code>/bid/{mediationProviderName}</code><br>DT provides the mediationProviderName as a part of initial integration setup. For more information, contact your DT representative.</p>                                                                                  |
| Protocol         | <p>DT accepts the following protocols:</p><ul><li>HTTP: <code>HTTP/1.1</code> or <code>HTTP/2</code> on Port 80</li><li>HTTPS: <code>HTTP/1.1</code> or <code>HTTP/2</code> on Port 443<br>To ensure transaction security, DT recommends using HTTPS protocol.</li></ul> |
| Headers          | `Accept-Encoding: gzip`                                                                                                                                                                                                                                                  |
| Timeout          | 620 seconds                                                                                                                                                                                                                                                              |

### Testing Bidding Integration

Before going live with your DT Exchange integration, DT can facilitate testing by configuring test placements to always fill with specific test ads. For more information, contact your DT representative.


# Privacy and Compliance


# GDPR

The General Data Protection Regulation ([GDPR](https://gdpr.eu/)) sets guidelines for collecting and processing personal information from individuals in the European Union (EU).

Digital Turbine applies internal processes to anonymize user data and retain the data's value while protecting user identity. In addition, Digital Turbine flags its demand partners and mediated ad networks when a user declines GDPR consent and does not wish to receive targeted ads in the app.

## GDPR SDK APIs <a href="#gdpr-sdk-apis" id="gdpr-sdk-apis"></a>

All SDKs include APIs to communicate user consent provided to DT and share their consent to DT's demand partners and mediated ad networks.

{% hint style="info" %}
To comply with GDPR requirements, update the DT SDK in your app. DT also recommends notifying your users to update the app to maintain compliance.
{% endhint %}


# COPPA

The Children's Online Privacy Protection Act ([COPPA](https://www.ftc.gov/legal-library/browse/rules/childrens-online-privacy-protection-rule-coppa)) sets guidelines for collecting and processing personal information from children under the age of 13. It applies to apps and digital services, either directed at children or serving a general audience, where children may be present. You must assess both the nature of the content and the intended audience when configuring COPPA-related settings.

DT Exchange allows you to configure COPPA compliance at the app, placement, or user level. Configuration at the app level ensures placements and users inherit the same settings. Placement and user-level configurations allow you to apply different COPPA settings to specific placements or individual users. COPPA compliance at any level confirms that the app, placement, or user context is not directed at children under the age of 13 or to a general audience that may include them.

### App Level Settings <a href="#h_01jsbhxtwwdje6h3qvqv1vdsyt" id="h_01jsbhxtwwdje6h3qvqv1vdsyt"></a>

App-level settings are applied to the placements and user level settings associated with your app. To configure COPPA at the app level, select the checkbox below the **Categories\*** field when you add or edit an app. This confirms that your app is COPPA-compliant. For more information, see [Adding an App](/dt-console/app-management/adding-a-new-app/adding-an-app) or [Editing App Settings.](/dt-console/app-management/setting-up-an-existing-app/editing-app-settings)

<div align="left" data-with-frame="true"><img src="/files/P9S64yWM9FS7RqDDSCVL" alt=""></div>

### Placement Level Settings <a href="#h_01jsbhxtwwb2eaf62hcqyp1se1" id="h_01jsbhxtwwb2eaf62hcqyp1se1"></a>

You can manage COPPA compliance at the placement level if your app has a mixed audience. This allows you to configure individual placements based on the intended audience and overrides the app-level COPPA setting.

To configure COPPA at the placement level, select the checkbox in the **Privacy Settings** area when you add or edit a placement. This confirms that your placement is COPPA-compliant. For more information, see [Setting Up Placements](/dt-console/app-management/setting-up-an-existing-app/setting-up-placements).

<div align="left" data-with-frame="true"><img src="/files/7iEHA3Ari1tzf0INkkvc" alt=""></div>

### User Level Settings <a href="#h_01jsbhxtww6hx27k5sj2qgpcy0" id="h_01jsbhxtww6hx27k5sj2qgpcy0"></a>

The DT Exchange SDK 8.2.3 and later allows you to flag users as COPPA-compliant at the user level. If your app has a mixed audience and has an age screen or gate mechanism, you can define the COPPA settings at the user level and implement the COPPA API. This allows you to flag specific users as children. In the event of a conflict between the settings in the Console and the values passed through the DT Exchange SDK API, the App Level setting is used.

For more information about how to integrate the DT Exchange SDK, see the following articles:

* [Integrating the Android SDK](/dt-exchange/sdk-configuration/integrating-the-android-sdk)
* [Integrating the iOS SDK](/dt-exchange/sdk-configuration/integrating-the-ios-sdk)


# LGPD

The Brazilian General Data Protection Law, the Lei Geral de Proteção de Dados Pessoais ([LGPD](https://www.gov.br/anpd/pt-br/centrais-de-conteudo/outros-documentos-e-publicacoes-institucionais/lgpd-en-lei-no-13-709-capa.pdf)) sets guidelines for collecting and processing personal information from individuals in Brazil. LGPD requires that you only process personal data for legitimate, specific, explicit and clearly communicated purposes as defined by the Brazilian Data Protection Authority (ANPD).

Digital Turbine applies internal processes to anonymize user data and retain the data's value while protecting user identity. In addition, Digital Turbine flags its demand partners and mediated ad networks when a user declines LGPD consent and does not wish to receive targeted ads in the app.

## LGPD SDK APIs <a href="#gdpr-sdk-apis-0-2" id="gdpr-sdk-apis-0-2"></a>

All SDKs include APIs to communicate user consent provided to DT and share their consent to DT's demand partners and mediated ad networks.

{% hint style="info" %}
To comply with LGPD requirements, update the DT SDK in your app. DT also recommends notifying your users to update the app to maintain compliance.
{% endhint %}


# Apple App Privacy Details

App privacy details on the App Store, known as Apple's Nutritional Label, provide transparency about data collection. This feature requires every app submission to disclose collected data, including information from third-party sources, such as advertising platforms.

DT provides clear guidance on its data collection practices within [Apple's App Store privacy policies](https://developer.apple.com/app-store/app-privacy-details/) to help you meet this requirement. For each required data type, DT specifies whether it collects this data, how it collects the data, and for what purpose.

## Data Use <a href="#h_01jnxkt1r666vecc0xqx7tzgp8" id="h_01jnxkt1r666vecc0xqx7tzgp8"></a>

The following tables list the Apple [data types](https://developer.apple.com/app-store/app-privacy-details/#data-type) and indicates which types DT collects and for what purpose. DT uses your data solely for third-party advertising, including displaying ads in your app, or sharing data with entities that display third-party ads.

### Contact Info

| DATA TYPE               | DESCRIPTION                                                                 |
| ----------------------- | --------------------------------------------------------------------------- |
| Name                    | First or Last name.                                                         |
| Email Address           | Including but not limited to a hashed email address.                        |
| Phone Number            | Including but not limited to a hashed telephone number.                     |
| Physical Address        | Home address, physical address, or mailing address.                         |
| Other User Contact Info | Any other information that can be used to contact the user outside the app. |

### Health and Fitness

| DATA TYPE | DESCRIPTION                                                                                                                                                                                                        |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Health    | Health and medical data, including but not limited to data from the Clinical Health Records API, Movement Disorder APIs, health-related human subject research, or any other user provided health or medical data. |
| Fitness   | Fitness and exercise data, including, but not limited to the Motion and Fitness API.                                                                                                                               |

### Financial Info

| DATA TYPE            | DESCRIPTION                                                                                                                                                                                                                                                                            |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Payment Info         | Form of payment, payment card number, or bank account number. If your app uses a payment service, the payment information is entered outside your app, and you, as the developer, never have access to the payment information. It is not collected and does not need to be disclosed. |
| Credit Info          | Credit score.                                                                                                                                                                                                                                                                          |
| Other Financial Info | Salary, income, assets, debts, or any other financial information.                                                                                                                                                                                                                     |

### Location

| DATA TYPE        | DESCRIPTION                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Precise Location | <p>Information describing the location of a user or device with the same or greater resolution as a latitude and longitude, with three or more decimal places.</p><p><br>DT does not collect or attempt to collect precise location data.</p>                                                                                                                                                                                                                        |
| Coarse Location  | <p>Information describing the location of a user or device with lower resolution than a latitude or longitude with three or more decimal places, such as Approximate Location Services.</p><p><br>Publishers have the option to share coarse location with DT. When enabled, the app collects this data after obtaining the user's explicit consent, which the DT SDK collects.<br>DT does not independently collect or attempt to collect coarse location data.</p> |

### Sensitive Info

| DATA TYPE      | DESCRIPTION                                                                                                                                                                                                        |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Sensitive Info | Racial or ethnic data, sexual orientation, pregnancy or childbirth information, disability, religious or philosophical beliefs, trade union membership, political opinion, genetic information, or biometric data. |

### Contacts

| DATA TYPE | DESCRIPTION                                                          |
| --------- | -------------------------------------------------------------------- |
| Contacts  | List of contacts on the user's phone, address book, or social graph. |

### User Content

| DATA TYPE               | DESCRIPTION                                                                          |
| ----------------------- | ------------------------------------------------------------------------------------ |
| Emails or Text Messages | Including the subject line, sender, recipients, and contents of the email or message |
| Photos or Videos        | Photos and videos of the user.                                                       |
| Audio Data              | Voice or sound recordings of the user.                                               |
| Gameplay Content        | User-generated content in-game.                                                      |
| Customer Support        | Data generated by the user during a customer support request.                        |
| Other User Content      | Any other user-generated content.                                                    |

### Browsing History

| DATA TYPE        | DESCRIPTION                                                                                  |
| ---------------- | -------------------------------------------------------------------------------------------- |
| Browsing History | Information about content the user has viewed that is not part of the app, such as websites. |

### Search History

| DATA TYPE      | DESCRIPTION                                      |
| -------------- | ------------------------------------------------ |
| Search History | Information about searches performed in the app. |

### Identifiers

| DATA TYPE | DESCRIPTION                                                                                                                                                                                                                                                                                                                                                                      |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| User ID   | <p>Screen name, handle, account ID, assigned user ID, customer number, or other user- or account-level ID that can be used to identify a particular user or account.</p><p><br>DT collects publisher or app-specific user IDs if the app provides them.<br>DT does not independently collect or attempt to collect this data.</p>                                                |
| Device ID | <p>Device's advertising identifier or other device-level ID.</p><p><br>DT collects Identifier for Vendors (IDFV) and Identifier for Advertisers (IDFA) when the user enables them through their device settings, for example, Limited Ad Tracking (LAT) is disabled. DT uses this information to calculate Daily Active Users, Frequency Capping, and Server-Side Rewarding.</p> |

### Purchases

| DATA TYPE        | DESCRIPTION                                                    |
| ---------------- | -------------------------------------------------------------- |
| Purchase History | An account's or individual's purchases or purchase tendencies. |

### Usage Data

| DATA TYPE           | DESCRIPTION                                                                                                                                                                                                          |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Product Interaction | App launches, taps, clicks, scrolling information, music listening data, video views, saved place in a game, video, or song, or other information about how the user interacts with the app.                         |
| Advertising Data    | <p>Information about the advertisements the user has seen.</p><p><br>DT collects data related to the ads served to app users through DT services, such as Impressions, Advertiser Name, Clicks, and Completions.</p> |
| Other Usage Data    | Any other data about user activity in the app.                                                                                                                                                                       |

### Diagnostics

| DATA TYPE             | DESCRIPTION                                                                                      |
| --------------------- | ------------------------------------------------------------------------------------------------ |
| Crash Data            | <p>Crash logs.</p><p><br>DT monitors the app crash logs.</p>                                     |
| Performance Data      | Launch time, hang rate, or energy use.                                                           |
| Other Diagnostic Data | Any other data collected for the purposes of measuring technical diagnostics related to the app. |

### Other Data

| DATA TYPE        | DESCRIPTION                         |
| ---------------- | ----------------------------------- |
| Other Data Types | Any other data types not mentioned. |

For more information about DT's Privacy Policy, see [Notice at Collection and Website Privacy Policy](https://www.digitalturbine.com/privacy-policy/).


# Google Data Safety Form

Google Play requires all developers to define which data is collected by their apps, including third-party libraries or SDKs integrated within the apps, for display in the [Data Safety section on Google Play](https://support.google.com/googleplay/android-developer/answer/10787469?hl=en#zippy=%2Cdata-types%2Cwhat-users-will-see%2Cdata-collection%2Cpurposes%2Coptional-format-for-sdks%2Cdata-sharing%2Cdata-handling%2Cother-app-and-data-disclosures%2Ccommitted-to-follow-the-families-policy-available-soon-to-applicable-apps%2Cam-i-required-to-provide-a-deletion-mechanism-must-it-be-for-any-and-all-user-data%2Chow-should-i-treat-the-collection-and-use-of-ip-addresses). To assist with meeting this requirement, DT provides the following guide on our data collection practices in the context of Google’s data safety questionnaire. For each data type, we state whether DT collects this data, and if so, how and for what purpose. Use these statements to correctly and accurately answer Google’s data safety questionnaire for your app.

{% hint style="warning" %}
The information provided here is intended to assist you in answering data safety questions. This information does not represent legal advice, and you are required to work with your own professional advisors to determine exactly how Google policies apply to you, as well as adapt responses for your specific use case and configuration.
{% endhint %}

## Data Collection FAQs

<details>

<summary>Does the DT SDK collect or share any of the required user data types?</summary>

Yes.

</details>

<details>

<summary>Is all of the user data collected by the DT SDK encrypted in transit?</summary>

Yes.

</details>

<details>

<summary>Does DT provide a way for users to request that their data be deleted?</summary>

Yes. DT can complete data deletion requests from users. As a processor, DT refers data subjects to publishers. As controllers, publishers are responsible for managing and validating data deletion requests.

</details>

## Data Usage and Handling

This section explains how the DT SDK uses and handles various data types so that you can complete the [Data Safety section on Google Play](https://support.google.com/googleplay/android-developer/answer/10787469?hl=en#zippy=%2Cdata-types%2Cwhat-users-will-see%2Cdata-collection%2Cpurposes%2Coptional-format-for-sdks%2Cdata-sharing%2Cdata-handling%2Cother-app-and-data-disclosures%2Ccommitted-to-follow-the-families-policy-available-soon-to-applicable-apps%2Cam-i-required-to-provide-a-deletion-mechanism-must-it-be-for-any-and-all-user-data%2Chow-should-i-treat-the-collection-and-use-of-ip-addresses).

### Location

Does the DT SDK collect the user’s Approximate location?

<table><thead><tr><th width="349.685302734375" valign="top">Collected?</th><th width="99.510498046875" valign="top">Shared?</th><th width="115.0343017578125" valign="top">Required?</th><th width="129.833984375" valign="top">Ephemeral?</th></tr></thead><tbody><tr><td valign="top"><p><strong>Yes</strong>.</p><p>DT collects this for:</p><ul><li>Fraud prevention</li><li>Security and compliance</li><li>Advertising or marketing</li></ul></td><td valign="top">No</td><td valign="top">No</td><td valign="top">Yes</td></tr></tbody></table>

Does the SDK collect the user’s Precise location?

<table><thead><tr><th width="350.332763671875" valign="top">Collected?</th><th width="100.13232421875" valign="top">Shared?</th><th width="114.7176513671875" valign="top">Required?</th><th width="129.6248779296875" valign="top">Ephemeral?</th></tr></thead><tbody><tr><td valign="top"><p><strong>Yes</strong>.</p><p><code>Precise location</code> is <strong>not independently collected by the DT's SDK</strong>. Only when it is collected only through the publisher, after they have obtained the user's explicit consent to such data collection, DT's SDK will collect such data.</p></td><td valign="top">No</td><td valign="top">No</td><td valign="top">Yes</td></tr></tbody></table>

### Personal Information

Does the DT SDK collect any data type under the **Personal Info** category?

<table><thead><tr><th width="350.207763671875">Collected?</th><th width="110.365234375">Shared?</th><th width="114.623291015625">Required?</th><th width="130.357666015625">Ephemeral?</th></tr></thead><tbody><tr><td><p><strong>No</strong>.</p><p>This is never collected by the DT SDK.</p></td><td>No</td><td>No</td><td>No</td></tr></tbody></table>

### Financial Information

Does the DT SDK collect any data type under the **Financial Info** category?

<table><thead><tr><th width="349.809326171875">Collected?</th><th width="110.4111328125">Shared?</th><th width="114.83642578125">Required?</th><th width="130.434326171875">Ephemeral?</th><th data-hidden></th></tr></thead><tbody><tr><td><p><strong>No</strong>.</p><p>This is never collected by the DT SDK.</p></td><td>No</td><td>No</td><td>No</td><td>Financial Info</td></tr></tbody></table>

### Health and Fitness

Does the DT SDK collect any data type under the **Health and Fitness** category?

<table><thead><tr><th width="349.630859375">Collected?</th><th width="110.239990234375">Shared?</th><th width="114.8035888671875">Required?</th><th width="129.7071533203125">Ephemeral?</th></tr></thead><tbody><tr><td><p><strong>No</strong>.</p><p>This is never collected by the DT SDK.</p></td><td>No</td><td>No</td><td>No</td></tr></tbody></table>

### Messages

Does the DT SDK collect any data type under the **Messages** category?

<table><thead><tr><th width="349.85107421875">Collected?</th><th width="109.603515625">Shared?</th><th width="110.24951171875">Required?</th><th width="100">Ephemeral?</th></tr></thead><tbody><tr><td><p><strong>No</strong>.</p><p>This is never collected by the DT SDK.</p></td><td>No</td><td>No</td><td>No</td></tr></tbody></table>

### Photos and Videos

Does the DT SDK collect any data type under the **Photos and Videos** category?

<table><thead><tr><th width="350.295654296875">Collected?</th><th width="100">Shared?</th><th width="100">Required?</th><th width="100">Ephemeral?</th></tr></thead><tbody><tr><td><p><strong>No</strong>.</p><p>This is never collected by the DT SDK.</p></td><td>No</td><td>No</td><td>No</td></tr></tbody></table>

### Audio

Does the DT SDK collect any data type under the **Audio** category?

<table><thead><tr><th width="350.384521484375">Collected?</th><th width="100">Shared?</th><th width="100">Required?</th><th width="100">Ephemeral?</th></tr></thead><tbody><tr><td><p><strong>No</strong>.</p><p>This is never collected by the DT SDK.</p></td><td>No</td><td>No</td><td>No</td></tr></tbody></table>

### Files and Docs

Does the DT SDK collect any data type under the **Files and Docs** category?

<table><thead><tr><th width="350.019287109375">Collected?</th><th width="100">Shared?</th><th width="100">Required?</th><th width="100">Ephemeral?</th></tr></thead><tbody><tr><td><p><strong>No</strong>.</p><p>This is never collected by the DT SDK.</p></td><td>No</td><td>No</td><td>No</td></tr></tbody></table>

### Calendar

Does the DT SDK collect any data type under the **Calendar** category?

<table><thead><tr><th width="349.55224609375">Collected?</th><th width="100">Shared?</th><th width="100">Required?</th><th width="100">Ephemeral?</th></tr></thead><tbody><tr><td><p><strong>No</strong>.</p><p>This is never collected by the DT SDK.</p></td><td>No</td><td>No</td><td>No</td></tr></tbody></table>

### Contacts

Does the DT SDK collect any data type under the **Contacts** category?

<table><thead><tr><th width="349.716064453125">Collected?</th><th width="100">Shared?</th><th width="100">Required?</th><th width="100">Ephemeral?</th></tr></thead><tbody><tr><td><p><strong>No</strong>.</p><p>This is never collected by the DT SDK.</p></td><td>No</td><td>No</td><td>No</td></tr></tbody></table>

### App Activity

Does the DT SDK collect App interactions information?

<table><thead><tr><th width="350.15380859375">Collected?</th><th width="100">Shared?</th><th width="100">Required?</th><th width="100">Ephemeral?</th></tr></thead><tbody><tr><td><p><strong>Yes</strong>.</p><p>DT collects this for:</p><ul><li>Fraud prevention</li><li>Security and compliance</li><li>Advertising and/or marketing</li></ul><p>For contextual targeting, the DT SDK collects the following app activity:</p><ul><li>prior app bundle (<code>ext.lastbundle</code>)</li><li>prior Adomain (<kbd>ext.lastadomain</kbd>)</li><li>prior click activity (<code>ext.lastclick</code>)<br></li></ul></td><td>Yes</td><td>Yes</td><td>Yes</td></tr></tbody></table>

Does the DT SDK collect in-app search history information?

<table><thead><tr><th>Collected?</th><th width="100">Shared?</th><th width="100">Required?</th><th width="100">Ephemeral?</th></tr></thead><tbody><tr><td><p><strong>No</strong>.</p><p>This is never collected by the DT SDK.</p></td><td>No</td><td>No</td><td>No</td></tr></tbody></table>

Does the DT SDK collect information about installed apps?

<table><thead><tr><th>Collected?</th><th width="100">Shared?</th><th width="100">Required?</th><th width="100">Ephemeral?</th></tr></thead><tbody><tr><td><p><strong>No</strong>.</p><p>This is never collected by the DT SDK.</p></td><td>No</td><td>No</td><td>No</td></tr></tbody></table>

Does the DT SDK collect data about any other user-generated content?

<table><thead><tr><th>Collected?</th><th width="100">Shared?</th><th width="100">Required?</th><th width="100">Ephemeral?</th></tr></thead><tbody><tr><td><p><strong>No</strong>.</p><p>This is never collected by the DT SDK.</p></td><td>No</td><td>No</td><td>No</td></tr></tbody></table>

Does the DT SDK collect data about other actions (such as gameplay, likes, dialog options)?

<table><thead><tr><th width="449.560302734375">Collected?</th><th width="110.156982421875">Shared?</th><th width="114.5498046875">Required?</th><th>Ephemeral?</th></tr></thead><tbody><tr><td><p><strong>No</strong>.</p><p>This is never collected by the DT SDK.</p></td><td>No</td><td>No</td><td>No</td></tr></tbody></table>

### Web Browsing

Does the DT SDK collect any data type under the **Web Browse** category?

<table><thead><tr><th>Collected?</th><th width="100">Shared?</th><th width="100">Required?</th><th width="100">Ephemeral?</th></tr></thead><tbody><tr><td><p><strong>No</strong>.</p><p>This is never collected by the DT SDK.</p></td><td>No</td><td>No</td><td>No</td></tr></tbody></table>

### App Info and Performance

Does the DT SDK collect crash log data?

<table><thead><tr><th>Collected?</th><th width="100">Shared?</th><th width="100">Required?</th><th width="100">Ephemeral?</th></tr></thead><tbody><tr><td><p><strong>Yes</strong>.</p><p>DT collects this for:</p><ul><li>App functionality</li><li>Analytics</li></ul><p>The DT SDK only collects crash logs pertaining to our SDK and for no other reason.</p></td><td>No</td><td>Yes</td><td>No</td></tr></tbody></table>

Does the DT SDK collect diagnostics data?

| Collected? | Shared? | Required? | Ephemeral? |
| ---------- | ------- | --------- | ---------- |
| **No**     | N/A     | N/A       | N/A        |

Does the DT SDK collect other app performance data?

<table><thead><tr><th>Collected?</th><th width="100">Shared?</th><th width="100">Required?</th><th width="100">Ephemeral?</th></tr></thead><tbody><tr><td><p><strong>Yes</strong>.</p><p>DT collects this for:</p><ul><li>App functionality</li><li>Analytics</li></ul><p>The DT SDK collects information such as how much time it took the SDK to reply with an ad, whether it was shown or not, etc.</p></td><td>No</td><td>Yes</td><td>No</td></tr></tbody></table>

### Device and Other Identifiers

Does the DT SDK collect device and other IDs?

<table><thead><tr><th width="299.983642578125" valign="top">Collected?</th><th width="215.418701171875" valign="top">Shared?</th><th width="114.50537109375">Required?</th><th width="130.0987548828125">Ephemeral?</th></tr></thead><tbody><tr><td valign="top"><p><strong>Yes</strong>.</p><p>When made available by the user via device settings, DT collects the AAID for:</p><ul><li>App functionality</li><li>Analytics</li><li>Fraud prevention</li><li>Security and compliance</li><li>Advertising or marketing</li></ul><p>This is collected for purposes like counting Daily Active Users, Frequency Capping, Server-Side Rewarding, etc.</p></td><td valign="top"><p><strong>Yes</strong>.</p><p>DT may share this information for:</p><ul><li>Fraud prevention</li><li>Security and compliance</li><li>Advertising or marketing</li></ul></td><td>No</td><td>No</td></tr></tbody></table>


# GPP

Digital Turbine supports the Global Privacy Platform ([GPP](https://globalprivacyplatform.com/)) to centralize consent signals from publishers’ CMPs across the US and EU.GPP, developed by the [IAB](https://iabtechlab.com/), is a standardized framework that replaces the legacy US Privacy String (deprecated [January 31, 2024](https://iabtechlab.com/us-privacy-signal-deprecation-deadline-extended-to-january-31-2024/)). It allows consistent transmission of user consent and privacy preferences across global frameworks, including:

* US state privacy laws ([MSPA](https://www.iabprivacy.com/)): [CPRA](https://cppa.ca.gov/regulations/pdf/ccpa_statute.pdf), [VCDPA](https://law.lis.virginia.gov/vacodefull/title59.1/chapter53/), [CPA](https://leg.colorado.gov/bill_files/54661/download), [CTDPA](https://www.cga.ct.gov/2022/act/pa/pdf/2022PA-00015-R00SB-00006-PA.pdf), and [UCPA](https://le.utah.gov/xcode/Title13/Chapter61/C13-61_2022050420231231.pdf)​
* IAB Europe Transparency and Consent Framework ([TCF](https://iabeurope.eu/iab-europe-transparency-consent-framework-policies/)): [GDPR](https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=CELEX:32016R0679)​

The DT Exchange SDK reads the GPP String and Section IDs to determine whether user consent allows tracking and passes this information to Digital Turbine’s demand partners and mediated ad networks.To comply with GPP requirements, update the DT SDK in your app. DT also recommends notifying your users to update the app to maintain compliance.​<br>

{% hint style="info" %}
Digital Turbine supports both legacy privacy protocols, such as TCF and CCPA, and GPP. Hybrid mode allows support for publishers and DSPs that do not yet support GPP.
{% endhint %}


# TCF 2.3

The IAB [Transparency and Consent Framework (TCF)](https://iabeurope.eu/transparency-consent-framework/) sets guidelines for communicating user consent signals. It applies exclusively to traffic and bids within GDPR-supported countries in the European Economic Area (EEA).

Digital Turbine supports TCF 2.3 and passes consent signals to its DSP partners. Add DT's DSP partners to your `disclosedVendors` segment. TCF 2.3 mandates the use of the `disclosedVendors` segment to confirm vendor disclosure to users.

{% hint style="warning" %}
DSP partners not listed in your `disclosedVendors` segment cannot legally process EEA traffic and ignore your app's bid requests.
{% endhint %}

Allowlisting DT's DSP partners maintains your compliance and may increase your European bids and fill rates.

### DT's Vendor List

This file contains DT's supported DSP vendor IDs required for TCF 2.3 compliance. Copy the vendor IDs to your Consent Management Platform (CMP), ensuring they appear in the `disclosedVendors` segment of your TC strings.

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>Vendor ID DTX List.csv</td><td><a href="https://storage.googleapis.com/gcs-exchange-public-useast1-prod/IAB-DS-Vendor-ID-list/Vendor%20ID%20DTX%20List.csv">https://storage.googleapis.com/gcs-exchange-public-useast1-prod/IAB-DS-Vendor-ID-list/Vendor%20ID%20DTX%20List.csv</a></td></tr></tbody></table>


# Vietnam's Amended Law on Advertising

DT Exchange is compliant with Vietnam's Amended Law on Advertising ([Decree No. 342/2025/ND-CP](https://congbao.chinhphu.vn/van-ban/nghi-dinh-so-342-2025-nd-cp-468584.htm)). This legislation sets the requirements for online advertisement formats and user experience standards.

To ensure your apps are compliant with these updated regulations, you must upgrade to the following SDKs:

* DT Exchange Android SDK 8.4.5 or later
* DT Exchange iOS SDK 8.4.7 or later


# Mediating DT Exchange

The DT Exchange SDK supports mediation through partner networks for both Waterfall and SDK Bidding models.

* **Waterfall** ranks ad networks based on their average historical performance and prioritizes networks with the highest eCPM, fill rate, and lowest latency. The system sequentially passes impressions from one ad network to the next until they sell.
* **SDK bidding**, or header bidding, enables real-time advertising auctions and allows publishers to auction their ad inventory to multiple sources simultaneously.

The DT Exchange bidder allows DT Exchange to participate in RTB auctions and bid in programmatic exchanges on mediation platforms, which promotes fair competition among media buyers.

{% hint style="warning" %}
To mediate DT Exchange through other platforms, integrate the DTX SDK:

* [Integrating the Android SDK](/dt-exchange/sdk-configuration/integrating-the-android-sdk)
* [Integrating the iOS SDK](/dt-exchange/sdk-configuration/integrating-the-ios-sdk)
  {% endhint %}

The table below describes which DT Exchange SDK versions and ad types are supported on Android and iOS for each mediation platform.

<table data-header-hidden><thead><tr><th align="center"></th><th width="132" align="center"></th><th width="131.76953125" align="center"></th><th align="center"></th><th align="center"></th></tr></thead><tbody><tr><td align="center"><strong>Mediation Platform</strong></td><td align="center"><strong>Android</strong></td><td align="center"><strong>iOS</strong></td><td align="center"><strong>Waterfall</strong></td><td align="center"><strong>Bidding</strong></td></tr><tr><td align="center">FairBid</td><td align="center">8.4.5</td><td align="center">8.4.7</td><td align="center"></td><td align="center"><img src="/files/Ncd39fQjtxiFeeCB2lIV" alt=""> <img src="/files/Dks97iieVo2E6D5L22xd" alt=""> <img src="/files/mx43RWmbm15B44M1xgVD" alt=""> <img src="/files/bbTvCvbUHOwsC7dSWHCt" alt=""></td></tr><tr><td align="center">MAX</td><td align="center">8.4.7</td><td align="center">8.4.10</td><td align="center"><img src="/files/Ncd39fQjtxiFeeCB2lIV" alt=""> <img src="/files/Dks97iieVo2E6D5L22xd" alt=""> <img src="/files/mx43RWmbm15B44M1xgVD" alt=""> <img src="/files/bbTvCvbUHOwsC7dSWHCt" alt=""></td><td align="center"><img src="/files/Ncd39fQjtxiFeeCB2lIV" alt=""> <img src="/files/Dks97iieVo2E6D5L22xd" alt=""> <img src="/files/mx43RWmbm15B44M1xgVD" alt=""> <img src="/files/bbTvCvbUHOwsC7dSWHCt" alt=""></td></tr><tr><td align="center">Unity / LevelPlay</td><td align="center">8.4.7</td><td align="center">8.4.10</td><td align="center"><img src="/files/Ncd39fQjtxiFeeCB2lIV" alt=""> <img src="/files/Dks97iieVo2E6D5L22xd" alt=""> <img src="/files/mx43RWmbm15B44M1xgVD" alt=""> <img src="/files/bbTvCvbUHOwsC7dSWHCt" alt=""></td><td align="center"><img src="/files/Ncd39fQjtxiFeeCB2lIV" alt=""> <img src="/files/Dks97iieVo2E6D5L22xd" alt=""> <img src="/files/mx43RWmbm15B44M1xgVD" alt=""> <img src="/files/bbTvCvbUHOwsC7dSWHCt" alt=""></td></tr><tr><td align="center">AdMob</td><td align="center">8.4.6</td><td align="center">8.4.8</td><td align="center"><img src="/files/Ncd39fQjtxiFeeCB2lIV" alt=""> <img src="/files/Dks97iieVo2E6D5L22xd" alt=""> <img src="/files/mx43RWmbm15B44M1xgVD" alt=""> <img src="/files/bbTvCvbUHOwsC7dSWHCt" alt=""></td><td align="center"><img src="/files/Ncd39fQjtxiFeeCB2lIV" alt=""> <img src="/files/Dks97iieVo2E6D5L22xd" alt=""> <img src="/files/mx43RWmbm15B44M1xgVD" alt=""> <img src="/files/bbTvCvbUHOwsC7dSWHCt" alt=""> <img src="/files/DdakeybxWYPx6DlTLroQ" alt=""></td></tr><tr><td align="center">Google Ad Manager</td><td align="center">8.4.6</td><td align="center">8.4.8</td><td align="center"><img src="/files/Ncd39fQjtxiFeeCB2lIV" alt=""> <img src="/files/Dks97iieVo2E6D5L22xd" alt=""> <img src="/files/mx43RWmbm15B44M1xgVD" alt=""> <img src="/files/bbTvCvbUHOwsC7dSWHCt" alt=""></td><td align="center"><img src="/files/Ncd39fQjtxiFeeCB2lIV" alt=""> <img src="/files/Dks97iieVo2E6D5L22xd" alt=""> <img src="/files/mx43RWmbm15B44M1xgVD" alt=""> <img src="/files/bbTvCvbUHOwsC7dSWHCt" alt=""> <img src="/files/DdakeybxWYPx6DlTLroQ" alt=""></td></tr></tbody></table>

### Supported Ad Types

* <img src="/files/Ncd39fQjtxiFeeCB2lIV" alt="" data-size="line"> Banner. Rectangular ads fixed at the top or bottom of the screen.
* <img src="/files/Dks97iieVo2E6D5L22xd" alt="" data-size="line"> Interstitial. Full-screen static or video ads when the user interacts with your app.
* <img src="/files/mx43RWmbm15B44M1xgVD" alt="" data-size="line"> Rewarded. User-opted video ads that grant in-app rewards upon completion.
* <img src="/files/bbTvCvbUHOwsC7dSWHCt" alt="" data-size="line"> MREC. Medium rectangle ads, static or video, embedded within app content.
* <img src="/files/vIi7pZpg0lhZSqObAPNg" alt="" data-size="line"> Native. Ads that seamlessly blend into the app content.

More information about each Ad Type is available in [Ad Types and Specifications](/dt-exchange/additional-resources/ad-types-and-specification).

## Waterfall

Mediating DT Exchange through another mediation platform requires configurations in both the DT Exchange and the mediation platform dashboards.

### MAX

Enable DT Exchange in the MAX dashboard as described in MAX's [Bidder Network Guides](https://developers.applovin.com/en/max/mediated-network-guides/sdk-bidder-network-guides#digital-turbine-dt-exchange).

***

### Unity / LevelPlay

Enable DT Exchange in the Unity / LevelPlay dashboard as described in Unity's [DT Exchange Integration Guide](https://docs.unity.com/en-us/grow/levelplay/sdk/react/networks/guides/dt-exchange).

***

### Google AdMob

Enable DT Exchange in the Google AdMob dashboard as described in Google AdMob's Integrate DT Exchange with Mediation guide ([Android](https://developers.google.com/admob/android/mediation/fyber), [iOS](https://developers.google.com/admob/ios/mediation/dt-exchange)).

***

### Google Ad Manager

Enable DT Exchange in the Google AdManager dashboard as described in Google's Ad Manager Integrate DT Exchange with Mediation guide ([Android](https://developers.google.com/ad-manager/mobile-ads-sdk/android/mediation), [iOS](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/mediation)).

## SDK Bidding

Mediating DT Exchange through another mediation platform with SDK bidding requires configuration in the DT Exchange Bidder and the mediation platform dashboards.

{% hint style="info" %}
The DT Exchange bidder uses the first week to learn and optimize, which may cause performance fluctuations.
{% endhint %}

### MAX

Complete the following steps to enable DT Exchange Bidder in the MAX dashboard:

1. Create new [Placement IDs](/dt-exchange/getting-started-with-dt-exchange/setting-up-your-app-in-the-dt-console#addplacements) in the DT Console.
2. Log in to your [MAX](https://dash.applovin.com/login) account and follow the steps in MAX's [SDK Bidder Network Guides](https://developers.applovin.com/en/max/mediated-network-guides/sdk-bidder-network-guides#digital-turbine-dt-exchange).
3. Activate the placement in the MAX dashboard.

### Unity / LevelPlay

Complete the following steps to enable DT Exchange Bidder in the Unity / LevelPlay dashboard:

1. Create new [Placement IDs](/dt-exchange/getting-started-with-dt-exchange/setting-up-your-app-in-the-dt-console#addplacements) in the DT Console.
2. Log in to your [Unity](https://login.unity.com/en/sign-in) account and follow the steps in Unity's [DT Exchange Integration Guide](https://docs.unity.com/en-us/grow/levelplay/sdk/react/networks/guides/dt-exchange).
3. Activate the placement in the Unity dashboard.

## FAQ

<details>

<summary><strong>How to switch from Waterfall to Bidding?</strong></summary>

You cannot directly re-purpose a waterfall placement as a bidding placement. Instead, in DT Console, create a new placement, set it up for bidding, and deactivate the old waterfall placement.\
When setting up the placement in your mediation provider's dashboard, pick **DT Exchange** **Bidder** (not **DT Exchange**) as a mediated network.

</details>


# SDK Configuration

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th></th></tr></thead><tbody><tr><td><h2>Android</h2></td><td><a href="/pages/9f3499033d0dfd1b547c46b7f5d469a0c6749ba0">/pages/9f3499033d0dfd1b547c46b7f5d469a0c6749ba0</a></td><td><a href="/pages/NpN6EuQmAlOU6VLiCxkp">/pages/NpN6EuQmAlOU6VLiCxkp</a></td><td><a href="/pages/MwJVj2HI99ZpI309yNiV">/pages/MwJVj2HI99ZpI309yNiV</a></td><td><a href="/pages/XwxuDFO8YhlDCYyrmdNM">/pages/XwxuDFO8YhlDCYyrmdNM</a></td><td><a href="/pages/6fUQuzf2GlhRv2l3lgng">/pages/6fUQuzf2GlhRv2l3lgng</a></td><td><a href="/pages/HXNEj9NXzBCbwhpM5i6O">/pages/HXNEj9NXzBCbwhpM5i6O</a></td><td><a href="/pages/bk2VYgK2XaueVLBhWUoM">/pages/bk2VYgK2XaueVLBhWUoM</a></td><td><a href="/pages/d8f626ceb6c5301ac8c36095bac4ceb3c3944548">/pages/d8f626ceb6c5301ac8c36095bac4ceb3c3944548</a></td><td></td><td></td><td><a href="/pages/9f3499033d0dfd1b547c46b7f5d469a0c6749ba0">All Android SDK Configuration Docs</a></td></tr><tr><td><h2>iOS</h2></td><td><a href="/pages/bEIBYoxzxqKn67aroQrd">/pages/bEIBYoxzxqKn67aroQrd</a></td><td><a href="/pages/8yqTRuYjtzXoKZqMq81g">/pages/8yqTRuYjtzXoKZqMq81g</a></td><td><a href="/pages/jnvTYglyEBWkATIum4Rh">/pages/jnvTYglyEBWkATIum4Rh</a></td><td><a href="/pages/XcQeOdETLXwW8irbsuhX">/pages/XcQeOdETLXwW8irbsuhX</a></td><td><a href="/pages/07407f4c96d13bb867cd9d80a9091fd8e0c6940f">/pages/07407f4c96d13bb867cd9d80a9091fd8e0c6940f</a></td><td><a href="/pages/K695hdVYK5lVBWRh7HPQ">/pages/K695hdVYK5lVBWRh7HPQ</a></td><td><a href="/pages/oiBdLS12nGmwuIM7IlbY">/pages/oiBdLS12nGmwuIM7IlbY</a></td><td><a href="/pages/rv2djAILpywHUIAQwdFF">/pages/rv2djAILpywHUIAQwdFF</a></td><td><a href="/pages/bwQmmC2OQB2hhjev8ga6">/pages/bwQmmC2OQB2hhjev8ga6</a></td><td><a href="/pages/f946aff3a3bc1869f5cef2e607d70c6269540282">/pages/f946aff3a3bc1869f5cef2e607d70c6269540282</a></td><td><a href="/pages/bEIBYoxzxqKn67aroQrd">All iOS SDK Configuration Docs</a></td></tr></tbody></table>


# Integrating the Android SDK

This guide describes how to integrate the DT Exchange SDK into your Android project, which uses Maven Central for dependency management.

### Prerequisites <a href="#h_01jhmfkah3736e6qf8kntzcd1g" id="h_01jhmfkah3736e6qf8kntzcd1g"></a>

* Android 6.0+ (API Level 23)
* Kotlin 2.1.0 or later

## Step 1: Integrating the SDK in your App

You can integrate the DT Exchange SDK using either Maven Central dependencies or a manual download.\
Select one of the following options:

* [Configuring Maven Central](#configuring-maven-central)
* [Manually Downloading the SDK](#manually-downloading-the-sdk)

### **Configuring Maven Central**

To add DT Maven repository and plugins to your Gradle build script:

1. Add the following to your app product-level `build.gradle` inside the repositories section.
2. At the root level `build.gradle` file, there are usually two repository sections - one for `buildscript` and one for `allprojects`. Add the entry in `allprojects`:

{% code title="Groovy" %}

```groovy
allprojects {
  repositories {
    // add this
    mavenCentral()
  }
  // ...
}
```

{% endcode %}

3. Add the following to the project app-level `gradle` file inside the `dependencies` section.

{% code title="Groovy" %}

```groovy
dependencies {
    // ...
    implementation "com.fyber:marketplace-sdk:8.4.7"
    // ...
}
```

{% endcode %}

### **Manually Downloading the SDK**

To download the DT Exchange Android SDK, click here:

<a href="https://cdn2.inner-active.mobi/fmp-sdk/files/FyberMarketplace-Android-v8.4.7.zip" class="button secondary" data-icon="arrow-down">DT Exchange Android SDK 8.4.7</a>

1. Log in to the [DT Console](https://console.fyber.com/).
2. Copy the following files from the `Fyber Marketplace SDK` folder to your `project libs` folder.
   * For version 8.4.7:

     `fyber-marketplace-8.4.7.aar`
   * For version 8.1.0 and above (for Open Measurement support):

     `omsdk-android-1.5.4-release.aar`
3. Add the following repositories and dependencies to the project `build.gradle` file:

{% code title="Java" %}

```java
repositories {
    // ...
    // Add a flat dir repository
    flatDir {
       dirs 'libs'
    }
}

dependencies {
   // Add the marketplace AAR libraries
   implementation (name:"fyber-marketplace-8.4.7", ext:'aar')
   // add open measurement sdk - fyber marketplace 8.1.0 and above
   implementation (name:"omsdk-android-1.5.4-release", ext:'aar')
}
```

{% endcode %}

## Step 2: Integrating Google Play Services

DT recommends using Google Play Services to access your Google Advertising ID. This ID tracks your app's daily active users (DAU), and many ad campaigns require it. Without the ID, ad inventory is limited.

1. In the app-level `build.gradle` file, add the following dependencies:

{% code title="Groovy" %}

```groovy
dependencies  {
    implementation ('com.google.android.gms:play-services-base:Version#')
    // use only the ads identifier library
    implementation ('com.google.android.gms:play-services-ads-identifier:x.y.z')
    // or implementation ('com.google.android.gms:play-services-ads:x.y.z')
}
```

{% endcode %}

2. For apps targeting API Level 31 (Android 12) or higher, declare the Google Play Services permission in the `AndroidManifest.xml` file.\
   This step is required unless the app uses a recent Google Mobile Ads SDK version.

{% code title="XML" %}

```xml
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
```

{% endcode %}

For further information about Google Advertising ID Restrictions, read the following:

### Google Advertising ID Restrictions

<details>

<summary><strong>Permission Required for Advertising ID</strong></summary>

Google Advertising ID (GAID) is a unique string identifier that anonymously identifies a device for advertising purposes. Google Play Services provides this Advertising ID and enables users to opt out of personalized ads in apps or reset their identifier. When a user resets their identifier, it can connect to a previous identifier.

In 2021, Google announced a behavior change for apps targeting [Android 13](https://support.google.com/googleplay/android-developer/answer/6048248) (API Level 33) and higher, a `AD_ID` permission is required. For more information, see [Advertising ID](https://support.google.com/googleplay/android-developer/answer/6048248?hl=en).

To receive the Advertising ID, developers must add a new permission to the manifest file unless the app uses a recent version of the Google Mobile Ads SDK:

**XML**

{% code title="XML" %}

```xml
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
```

{% endcode %}

Recent versions of the Google Mobile Ads SDK (play-services-ads v20.4.0 and higher, or play-services-ads-identifier v17.1.0 and higher) include this permission. If the app uses these SDKs, the AD\_ID permission from the SDK's library manifest merges with your app's main manifest by default, making the Advertising ID available.

For more information about Google Play Services, see [Set Up Google Play Services](https://developers.google.com/android/guides/setup).

</details>

## Step 3: Adding Permissions - Android Manifest File

1. Add the following mandatory permission to your `AndroidManifest.xml` file:

{% code title="Java" %}

```java
<uses-permission android:name="android.permission.INTERNET"/>
```

{% endcode %}

2. To enhance targeting capabilities, add these permissions:

{% code title="Java" %}

```java
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
```

{% endcode %}

{% hint style="info" %}
The `ACCESS_NETWORK_STATE` permission differentiates WiFi from a cellular network.
{% endhint %}

## Step 4: Initializing the SDK

SDK initialization is mandatory because the DT SDK relies on the Console configuration for functionality. Without it, the SDK won't operate, and no ads will display. DT recommends performing this step during the app's initialization. Follow these steps to initialize the SDK.

### Google Play Families Ads API

To participate in the Google Play Families Ads program, run the following code to indicate if the user is a child:

{% code title="Java" %}

```java
InneractiveAdManager.currentAudienceIsAChild();
```

{% endcode %}

{% hint style="info" %}
Call this API once per app session before initializing the SDK. If the app doesn't contain the API, the user is not considered a child user by default.
{% endhint %}

After configuring your `AndroidManifest` file and preparing to request ads, initialize `InneractiveAdManager.initialize(context, <"appID">)`, and pass on your Activity or application context with the following code:

{% code title="Java" %}

```java
public class MainActivity extends Activity {

   @Override
   protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      InneractiveAdManager.initialize(this, "Enter_Your_DT-Exchange_AppID");
   }

   @Override
   protected void onDestroy() {
      if (isFinishing()) {
           //Optionally destroy the SDK after the activity has been destroyed
   InneractiveAdManager.destroy();
      }
   }
}
```

{% endcode %}

{% hint style="info" %}
Call `InneractiveAdManager.destroy()` when you no longer need the library to display more ads, as this release any resources used by the SDK.
{% endhint %}

{% hint style="success" %}
If you intend to destroy the library from within your activity's `onDestroy` method, ensure that the activity has finished.\
To adjust or debug the logging library level, see [DT Logging on Android](/dt-exchange/sdk-configuration/integrating-the-android-sdk/dt-logging-on-android).
{% endhint %}

#### Locating the App ID

To locate the App ID on the DT Console:

1. From the [DT Console](https://console.fyber.com/), go to **Monetization→App Management**.\
   The **Apps dashboard** window appears.
2. Navigate to the required app.\
   The App ID appears below the app's name.

<div align="left" data-with-frame="true"><img src="/files/k7SSeGgO7Od9OeCLDaZe" alt=""></div>

### Initialization Callback

You can use the following initialization callback to `InneractiveAdManager` to monitor the SDK's initialization status:

{% code title="Java" %}

```java
InneractiveAdManager.initialize(context, appId, new OnFyberMarketplaceInitializedListener() {
           @Override
           public void onFyberMarketplaceInitialized(FyberInitStatus status) {
               // ...
           }
});
```

{% endcode %}

Valid values:

* `SUCCESSFULLY`: SDK initialized successfully.
* `FAILED_NO_KITS_DETECTED`: Only the `core` DT Exchange library detected. Check dependencies and add the `video-kit` and `mraid-kit`.
* `FAILED`: SDK failed to communicate with servers. Retry initialization.
* `INVALID_APP_ID`: Incorrect app ID. Verify configuration or contact support.

{% hint style="warning" %}
DT recommends not using the SDK or performing ad requests when the `FyberInitStatus` is `FAILED`. The SDK attempts to re-initialize itself internally when an ad request is executed, but the callback is not invoked in such cases.
{% endhint %}

### Passing a User ID to the SDK

To set a User ID for the SDK session, run the following code:

{% hint style="success" %}
The initial method of the SDK must be called in advance; there is no need to wait for the `onFyberMarketplaceInitialized` callback.
{% endhint %}

{% code title="Java" %}

```java
String userId = ...;
//Without reflection, using an import of the InneractiveAdManager class -
InneractiveAdManager.setUserId(userId);

//Optionally, using reflection as an example -
Class FyberInneractiveAdManagerClass =
    Class.forName("com.fyber.inneractive.sdk.external.InneractiveAdManager");
Method setUserIdStaticMethod =
    FyberInneractiveAdManagerClass.getDeclaredMethod("setUserId", String.class);
setUserIdStaticMethod.invoke(null, userId);
```

{% endcode %}

The basic Android SDK integration is complete. You can now integrate other ad types as required. For more information, see [Android Ad Formats](/dt-exchange/sdk-configuration/integrating-the-android-sdk/android-ad-formats).

{% hint style="warning" %}
Review the instructions below for user consent related issues.
{% endhint %}

## Step 5: Adding User Consent

User consent mechanisms comply with various data protection laws. The following regulations mandate that users' data be handled with explicit consent:

* [GDPR](#01H8VGNGENZD5DAC75CXMWGZ8G)
* [CCPA](#01H8VGNGENHQ84WW6K15J0Q2M1)
* [LGPD](#01H8VGNGEPZVGRPFJAXJ3RRNKB)
* [COPPA](#01H8VGNGEPEAJ9ESSR1DT1WKMM)
* [GPP](#gpp)

### GDPR

The General Data Protection Regulation of the European Union ([GDPR](https://gdpr.eu/)) requires you to implement a user consent mechanism. A user is within the GDPR scope for your app when one or all of the following apply:

* The user is currently located in the EU.
* The user has registered with the app as an EU resident.
* The app is specifically targeted to EU users.

To comply with EU regulations and ensure seamless ad monetization, DT recommends consulting a legal advisor to determine the best approach for your business and using a Consent Management Platform (CMP).

If you haven’t updated to SDK 8.3.0 or later, you need to manually configure consent values with your CMP. The SDK automatically retrieves these values from 8.3.0 and later, eliminating the need for manual setup. For a complete list of CMPs, see the [Interactive Advertising Bureau - CMP List](https://iabeurope.eu/cmp-list/).

To incorporate GDPR consent values manually, set the `setGdprConsent` API in Boolean format, for example:

{% code title="Java" %}

```java
/**
     * Set the general data protection regulation user consent status
     * @param wasConsentGiven
     */
    public static void setGdprConsent(boolean wasConsentGiven) {…}

    // Calling the consent method

    InneractiveAdManager.setGdprConsent(true);

    /**
    * Set the general data protection regulation consent string
    * @param gdprConsent the consent string
    */
    public static void setGdprConsentString(String gdprConsent) {…}

    // Calling the consent method

    InneractiveAdManager.setGdprConsentString("consentString");
```

{% endcode %}

Valid values:

* `True`: The user grants consent.
* `False`: The user does not grant consent.

#### **Setting Consent String**

{% hint style="warning" %}
The user's consent status must be passed to the SDK before the SDK is initialized.\
When you set a GDPR consent value for a user, DT assumes that the user is subject to GDPR rules, even if the user is outside Europe. If a user updates their consent later, you only need to call the API again with the new value.
{% endhint %}

To set the GDPR consent string, use the following API:

{% code title="Java" %}

```java
InneractiveAdManager.setGdprConsentString("consentString");
```

{% endcode %}

To clear the consent flag and consent data, use the following API:

{% code title="Java" %}

```java
InneractiveAdManager.clearGdprConsentData();
```

{% endcode %}

If you don't obtain the user's consent before sending the SDK, only contextual ads appear.

### CCPA

The California Consumer Privacy Act of 2018 ([CCPA](https://iabtechlab.com/standards/ccpa/)) protects the personal information of California residents and applies to all companies operating in California. If a California resident uses a mobile app developer's app, CCPA applies to the developer and every company that processes the personal information of the app's users.

For more information on CCPA and DT's practices, see US Privacy Compliance and [IAB CCPA Compliance Framework](https://www.iab.com/guidelines/ccpa-framework/).

#### **CCPA API**

To set the CCPA consent string, use the following API:

{% code title="Java" %}

```java
/*** Setting the US privacy setting string
* @param consentString a non empty String
*/
public static void setUSPrivacyString(String consentString) {…}

// Calling the consent method
InneractiveAdManager.setUSPrivacyString("1YNN");
// This is an example value when the user chooses NOT to 'opt-out'
```

{% endcode %}

DT supports the following values for the US Privacy String:

* `1---`: CCPA does not apply, for example, the user is not a California resident.
* `1YNN`: User does NOT opt out, ad experience continues.
* `1YYN`: User opts out of targeted advertising.

For more information, see [IAB US Privacy String](https://github.com/InteractiveAdvertisingBureau/USPrivacy/blob/master/CCPA/US%20Privacy%20String.md).

To clear the privacy setting flag and opt-out data, use the following API:

{% code title="Java" %}

```java
InneractiveAdManager.clearUSPrivacyString();
```

{% endcode %}

### LGPD

The Brazilian General Data Protection Law, the Lei Geral de Proteção de Dados Pessoais ([LGPD](https://lgpd-brazil.info/)), mandates processing personal data for legitimate, specific, explicit, and communicated purposes.

To set the LGPD consent values, use the following API:

{% code title="Java" %}

```java
InneractiveAdManager.setLgpdConsent(boolean wasConsentGiven)
```

{% endcode %}

Valid values:

* `IALGPDConsentTypeGiven`: `True`.
* `IALGPDConsentTypeDenied`: `False`.

If the consent value is not set, the default is `False`.

To clear the consent flag and consent data, use the following API:

{% code title="Java" %}

```java
InneractiveAdManager.clearLgpdConsentData();
```

{% endcode %}

### COPPA

The Children's Online Privacy Protection Act of 1998 ([COPPA](https://www.ftc.gov/legal-library/browse/rules/childrens-online-privacy-protection-rule-coppa)) is a federal law that imposes specific requirements on websites and online service operators to protect the privacy of children under 13.

#### COPPA API for Flagging Specific Users

Android SDK 8.2.3 and later supports the COPPA API, which allows publishers to flag specific end users as children as required under COPPA.

{% hint style="warning" %}
Execute the COPPA API after successfully initializing the DT SDK and after every successful SDK initialization
{% endhint %}

To confirm that the target audience of the application applies to COPPA, use the following API:

{% code title="Java" %}

```java
InneractiveAdManager.currentAudienceAppliesToCoppa();
```

{% endcode %}

{% hint style="info" %}
It is the publisher’s responsibility to decide whether to use the COPPA API or to treat all users as children.\
If you want flag all users as children, see [COPPA](/dt-exchange/getting-started-with-dt-exchange/privacy/coppa).
{% endhint %}

### GPP

The IAB Global Privacy Protocol ([GPP](https://globalprivacyplatform.com/)) is a standardized framework for managing and transmitting user consent and privacy signals across the digital advertising ecosystem.

GPP is supported starting with Android SDK 8.4.4. For more information, see [GPP](/dt-exchange/getting-started-with-dt-exchange/privacy/gpp).

## Step 6: Configure Parameters

To add gender parameters, use the following API:

{% code title="Java" %}

```java
// For gender values, see: InneractiveUserConfig.Gender
InneractiveAdManager.setUserParams(new InneractiveUserConfig()
        .setGender(InneractiveUserConfig.Gender.FEMALE));
```

{% endcode %}

## Step 7: app-ads.txt

The `app-ads.txt` standard helps prevent the unauthorized selling of in-app inventory and app domain spoofing.

For more information about how to list your Developer Website URL in the Google Play Store, see [Adding a Developer Website](/dt-exchange/getting-started-with-dt-exchange/advanced-configurations/app-ads.txt).

## Step 8: (Optional ) Using the DT Exchange SDK in Secure Only Mode

The `InneractiveAdManager` API enables you to control how the SDK should perform any network connections.

{% code title="Java" %}

```java
InneractiveAdManager.useSecureConnections(boolean useSecureConnnections)
```

{% endcode %}

By invoking this setter with a value of `true`, all outgoing network connections from the DT Exchange SDK will use SSL/HTTPS. The default behavior is not to use secure connections.

{% hint style="warning" %}
Requesting secure-only content may decrease the demand that the SDK can render.
{% endhint %}

{% hint style="info" %}
The Android application-level secure API (`network-security-config cleartextTrafficPermitted`) takes precedence over this value. If you set `cleartextTrafficPermitted` to `false` and invoke the `useSecureConnections` setter with a value of `false`, the SDK behaves as if you requested secure connections only.
{% endhint %}

## Step 9: Adding the Vendor List

Add the vendor IDs from DT's approved vendor list to your CMP, ensuring they appear in the `disclosedVendors` segment of your TC string.

IAB Europe's Transparency and Consent Framework (TCF) 2.3 is a standardized framework that mandates you disclose your vendors to your users.

For more information and the up-to-date list of vendors, see [TCF 2.3](/dt-exchange/getting-started-with-dt-exchange/privacy/tcf-2.3).


# Android Ad Formats

DT Exchange supports the following ad formats:

* [Banner/MREC Ads](/dt-exchange/sdk-configuration/integrating-the-android-sdk/android-ad-formats/banner-mrec-ads)
* [Interstitial Ads](/dt-exchange/sdk-configuration/integrating-the-android-sdk/android-ad-formats/interstitial-ads)
* [Rewarded Ads](/dt-exchange/sdk-configuration/integrating-the-android-sdk/android-ad-formats/rewarded-ads)
* [Native Ads](/dt-exchange/sdk-configuration/integrating-the-android-sdk/android-ad-formats/native-ads)


# Banner/MREC Ads

Banner and MREC ads are rectangular, image-based ads designed to be integrated directly into an app's content.

## Adding the Ad Placement (Ad Spot) <a href="#id-01k5nzh3m1wyxstxbwezhrwfj5" id="id-01k5nzh3m1wyxstxbwezhrwfj5"></a>

Add the Ad Placement `AdSpot` integration for the display unit, as well as the `AdView Controller`:

{% code title="Java" %}

```java
// Spot integration for display square
InneractiveAdSpot mSpot = InneractiveAdSpotManager.get().createSpot();

// Adding the adview controller
InneractiveAdViewUnitController controller = new InneractiveAdViewUnitController();
mSpot.addUnitController(controller);
```

{% endcode %}

## Adding Listeners <a href="#id-01k60aefr2ey2c9krr59vjcytj" id="id-01k60aefr2ey2c9krr59vjcytj"></a>

Add listeners for the controller and the spot.

### Adding Event Listener for the Controller <a href="#h_01k6sw8901es4bj36exk9b1nmy" id="h_01k6sw8901es4bj36exk9b1nmy"></a>

The example below demonstrates how you would add an `EventListener` to receive Banner or MREC ad callbacks:

{% code title="Java" %}

```java
controller.setEventsListener(new InneractiveAdViewEventsListener() {
    @Override
    public void onAdImpression(InneractiveAdSpot adSpot) {
        Log.i(TAG, "onAdImpression");
    }
    @Override
    public void onAdClicked(InneractiveAdSpot adSpot) {
        Log.i(TAG, "onAdClicked");
    }
    @Override
    public void onAdWillCloseInternalBrowser(InneractiveAdSpot adSpot) {
        Log.i(TAG, "onAdWillCloseInternalBrowser");
    }
    @Override
    public void onAdWillOpenExternalApp(InneractiveAdSpot adSpot) {
        Log.i(TAG, "onAdWillOpenExternalApp");
    }
    @Override //Since VAMP 7.2.0
    public void onAdEnteredErrorState(InneractiveAdSpot adSpot, AdDisplayError error) {
        Log.i(TAG, "onAdEnteredErrorState");
    }
});
```

{% endcode %}

The `onAdEnteredErrorState` callback is invoked when the WebView renderer processes crash. For banner/MREC ads, destroy the current ad and request a replacement when `WebViewRendererProcessHasGoneError` occurs.

### Adding Request Listener for the Spot <a href="#h_01k6sw988vezzxgt8043x5p4b6" id="h_01k6sw988vezzxgt8043x5p4b6"></a>

The example below demonstrates how you would add a `RequestListener` for the Spot:

{% code title="Java" %}

```java
InneractiveAdSpot.RequestListener mSpotListener = new
InneractiveAdSpot.RequestListener() 
{
  @Override
  // When the ad request sends successfully.
  public void onInneractiveSuccessfulAdRequest(InneractiveAdSpot inneractiveAdSpot) {
  }
  @Override
  // When the ad request fails to send.
  public void onInneractiveFailedAdRequest(InneractiveAdSpot inneractiveAdSpot, InneractiveErrorCode inneractiveErrorCode) {
  }
};

mSpot.setRequestListener(mSpotListener);
```

{% endcode %}

## Fetching the Ad <a href="#h_01k6tc7br445b6t16x3kgp46jz" id="h_01k6tc7br445b6t16x3kgp46jz"></a>

The way in which the ad is fetched depends on the mediation type — Waterfall or SDK Bidding.

### Fetching the Ad for Waterfall <a href="#h_01hvkbkvnd8ky2eqsxp1cqczjw" id="h_01hvkbkvnd8ky2eqsxp1cqczjw"></a>

In Waterfall mediation, use `InneractiveAdRequest adRequest` to request the ad:

{% code title="Java" %}

```java
InneractiveAdRequest adRequest = new InneractiveAdRequest("add_your_spot_id"); 
// To perform the ad request
mSpot.requestAd(adRequest);
```

{% endcode %}

After a successful ad request, use `mSpot.isReady` to confirm the ad is ready and `controller.bindView(layout);` to display.

### Fetching the Ad for SDK Bidding <a href="#id-01k6tcasqnxm85jne4ncjabycy" id="id-01k6tcasqnxm85jne4ncjabycy"></a>

In SDK Bidding, DT Exchange must first generate a token for the Mediation SDK to use when identifying the request to server.

Use `getBidderToken` to generate a Bidder Token in a background thread:

{% code title="Java" %}

```java
BidTokenProvider.getBidderToken();
```

{% endcode %}

Return type: `java.lang.String`. If an error occurs, the returned value is null.

If DT Exchange wins the auction, load the ad with the `signaldata (adm)` that was received from the server:

{% code title="Java" %}

```java
public void loadAd(String admPayload);
```

{% endcode %}

If the load is successful: `public void onInneractiveSuccessfulAdRequest(InneractiveAdSpot inneractiveAdSpot)` callback is invoked.

If the ad fails to load: `public void onInneractiveFailedAdRequest(InneractiveAdSpot inneractiveAdSpot, InneractiveErrorCode inneractiveErrorCode)` callback is invoked.

## Displaying the Ad <a href="#id-01k60adgzs5k1f2r6pnpe1wtfg" id="id-01k60adgzs5k1f2r6pnpe1wtfg"></a>

Define the ad layout in your XML file:

{% code title="XML" %}

```xml
<LinearLayout
android:id="@+id/inneractive_ad_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
```

{% endcode %}

After a successful ad request, use `mSpot.isReady` to confirm the ad is ready and `controller.bindView(layout);` to display the ad:

{% code title="Java" %}

```java
// Check if we have ad content
if (mSpot.isReady()) {
// Getting the spot's controller
    InneractiveAdViewUnitController controller = (InneractiveAdViewUnitController)mSpot.getSelectedUnitController();
// Getting the ad view container
    ViewGroup layout = (ViewGroup)findViewById(R.id.inneractive_ad_layout);
// Showing the ad
    controller.bindView(layout);
}
```

{% endcode %}

## Releasing an Ad Placement <a href="#releasing-an-a-d-placement-0-17" id="releasing-an-a-d-placement-0-17"></a>

DT recommends releasing the allocated resources for ad display. For more information, see [Releasing Ad Instance Resources](/dt-exchange/sdk-configuration/integrating-the-android-sdk/releasing-ad-instance-resources).


# Interstitial Ads

Interstitial ads are full-screen, video, or interactive ads that appear at natural transition points within an app, such as between levels in a game or when a user is switching screens.

## Building the Ad Placement (Ad Spot) <a href="#h_01hvkbkvndmc7debb39s7m019a" id="h_01hvkbkvndmc7debb39s7m019a"></a>

Add the required controllers to set up the ad placement:

{% code title="Java" %}

```java
// Spot integration for fullscreen ad
InneractiveAdSpot mSpot = InneractiveAdSpotManager.get().createSpot();

// Adding the fullscreen controller
InneractiveFullscreenUnitController controller = new InneractiveFullscreenUnitController();

// Adding the video fullscreen controller
InneractiveFullscreenVideoContentController videoContentController = new InneractiveFullscreenVideoContentController();

// Adding the video fullscreen controller to the adview controller
controller.addContentController(videoContentController);
mSpot.addUnitController(controller);
```

{% endcode %}

## Adding Listeners <a href="#h_01hvkbkvnehw0td9r706p2fqtc" id="h_01hvkbkvnehw0td9r706p2fqtc"></a>

Add listeners for the controller and the spot.

### Adding Event Listener for the Controller <a href="#id-01k7bvqjscbadywmxscy8jpvwg" id="id-01k7bvqjscbadywmxscy8jpvwg"></a>

The example below demonstrates how you would add an `EventListener` to receive Interstitial ad callbacks:

#### Events: <a href="#h_01hvkbkvne4hgvgce0asmb7q44" id="h_01hvkbkvne4hgvgce0asmb7q44"></a>

{% code title="Java" %}

```java
controller.setEventsListener(new InneractiveFullscreenAdEventsListener() {
    @Override
    public void onAdImpression(InneractiveAdSpot inneractiveAdSpot) {
    }
    @Override
    public void onAdClicked(InneractiveAdSpot inneractiveAdSpot) {
    }
    @Override
    public void onAdWillOpenExternalApp(InneractiveAdSpot inneractiveAdSpot) {
    }
    @Override
    public void onAdEnteredErrorState(InneractiveAdSpot inneractiveAdSpot, InneractiveUnitController.AdDisplayError adDisplayError) {
    }
    @Override
    public void onAdWillCloseInternalBrowser(InneractiveAdSpot inneractiveAdSpot) {
    }
    @Override
    public void onAdDismissed(InneractiveAdSpot inneractiveAdSpot) {
    }
});
```

{% endcode %}

#### Video Events: <a href="#id-01k5dsgnhxvf76ehvhtnx708t5" id="id-01k5dsgnhxvf76ehvhtnx708t5"></a>

{% code title="Java" %}

```java
videoContentController.setEventsListener(new VideoContentListener() {
    @Override
    public void onProgress(int totalDurationInMsec, int positionInMsec) {
    }
    @Override
    public void onCompleted() {
    }
    @Override
    public void onPlayerError() {
        /**
         * Note: onPlayerError callback method is deprecated starting from VAMP v7.3.0,
         and won't be triggered when an error occurs. 
         * Note: The SDK handles such errors internally and no further action is required.
         */
    }
});
```

{% endcode %}

### Adding Request Listener for the Spot <a href="#id-01k7bvzbg0w7xfbzs6q3z8n3de" id="id-01k7bvzbg0w7xfbzs6q3z8n3de"></a>

The example below demonstrates how you would add a `RequestListener` for the Spot:

{% code title="Java" %}

```java
InneractiveAdSpot.RequestListener mSpotListener = new InneractiveAdSpot.RequestListener() 
{
    @Override
    // When the ad request sends successfully
    public void onInneractiveSuccessfulAdRequest(InneractiveAdSpot inneractiveAdSpot) {
    }
    @Override
    // When the ad request fails to send
    public void onInneractiveFailedAdRequest(InneractiveAdSpot inneractiveAdSpot, InneractiveErrorCode inneractiveErrorCode) {
    }
};
mSpot.setRequestListener(mSpotListener);
```

{% endcode %}

## Fetching the Ad <a href="#h_01hvkbkvnefs11qf08d4tkg0b9" id="h_01hvkbkvnefs11qf08d4tkg0b9"></a>

The way in which the ad is fetched depends on the mediation type — Waterfall or SDK Bidding.

### Fetching the Ad for Waterfall <a href="#id-01k7bw5f6pqa50yp10d7f72rzj" id="id-01k7bw5f6pqa50yp10d7f72rzj"></a>

In Waterfall mediation, use `InneractiveAdRequest adRequest` to request the ad:

{% code title="Java" %}

```java
InneractiveAdRequest adRequest = new InneractiveAdRequest("add_your_interstitial_spot_id");

// To perform the ad request
mSpot.requestAd(adRequest);
```

{% endcode %}

Optionally, you can mute ads by including `setMuteVideo(true)`:

{% code title="Java" %}

```java
InneractiveAdManager.setMuteVideo(true);
```

{% endcode %}

### Fetching the Ad for SDK Bidding <a href="#id-01k7bw8tsecy5e54ajw4wk5s6h" id="id-01k7bw8tsecy5e54ajw4wk5s6h"></a>

In SDK Bidding, DT Exchange must first generate a token for the Mediation SDK to use when identifying the request to the server.

Use `getBidderToken` to generate a Bidder Token in a background thread:

{% code title="Java" %}

```java
BidTokenProvider.getBidderToken();
```

{% endcode %}

Return type: `java.lang.String`. If an error occurs, the returned value is null.

If DT Exchange wins the auction, load the ad with the `signaldata (adm)` that was received from the server:

{% code title="Java" %}

```java
public void loadAd(String admPayload);
```

{% endcode %}

If the load is successful: `public void onInneractiveSuccessfulAdRequest(InneractiveAdSpot inneractiveAdSpot)` callback is invoked.

If the ad fails to load: `public void onInneractiveFailedAdRequest(InneractiveAdSpot inneractiveAdSpot, InneractiveErrorCode inneractiveErrorCode)` callback is invoked.

## Displaying the Ad <a href="#h_01hvkbkvne8tjpcw8xwbfeys7r" id="h_01hvkbkvne8tjpcw8xwbfeys7r"></a>

After a successful ad request, use `mSpot.isReady` to confirm the ad is ready and `controller.show(this);` to display the Ad:

{% code title="Java" %}

```java
// Checking if we have ad content
if (mSpot.isReady()) {
// Getting the spot's controller
    InneractiveFullscreenUnitController controller = (InneractiveFullscreenUnitController)mSpot.getSelectedUnitController();
// Showing the ad using the Activity's context
    controller.show(this);
}
```

{% endcode %}

## Releasing an Ad Placement <a href="#releasing-an-a-d-placement-0-17" id="releasing-an-a-d-placement-0-17"></a>

DT recommends releasing the allocated resources for ad display. For more information, see [Releasing Ad Instance Resources](/dt-exchange/sdk-configuration/integrating-the-android-sdk/releasing-ad-instance-resources).


# Rewarded Ads

Rewarded ads are full-screen, video or interactive ads that offer users an in-app reward (like extra lives, in-game currency, or exclusive content) for watching the complete ad.

## Building the Ad Placement (Ad Spot) <a href="#h_01hvkbkvnetmv9cvpvp949vxv9" id="h_01hvkbkvnetmv9cvpvp949vxv9"></a>

Add the required controllers to set up the ad placement:

{% code title="Java" %}

```java
// Spot integration for Rewarded Ads
InneractiveAdSpot mSpot = InneractiveAdSpotManager.get().createSpot();

// Adding the adview controller
InneractiveFullscreenUnitController controller = new InneractiveFullscreenUnitController();

// Adding the Video adview controller
InneractiveFullscreenVideoContentController videoContentController = new InneractiveFullscreenVideoContentController();

controller.addContentController(videoContentController);

mSpot.addUnitController(controller);
```

{% endcode %}

## Adding Listeners <a href="#h_01hvkbkvnepav23dd5m3gmx4n5" id="h_01hvkbkvnepav23dd5m3gmx4n5"></a>

Add listeners for the controller and the spot.

### Adding Event Listener for the Controller <a href="#id-01k7bx3d1jynmta7vvce1286rx" id="id-01k7bx3d1jynmta7vvce1286rx"></a>

The examples below demonstrate how you would add an `EventListener` to receive rewarded ad callbacks:

#### Events: <a href="#h_01k83r5g56k6ewhhv14gtmgqbh" id="h_01k83r5g56k6ewhhv14gtmgqbh"></a>

{% code title="Java" %}

```java
controller.setEventsListener(new InneractiveFullscreenAdEventsListener() {
    @Override
    public void onAdImpression(InneractiveAdSpot inneractiveAdSpot) {
    }
    @Override
    public void onAdClicked(InneractiveAdSpot inneractiveAdSpot) {
    }
    @Override
    public void onAdWillOpenExternalApp(InneractiveAdSpot inneractiveAdSpot) {
    }
    @Override
    public void onAdEnteredErrorState(InneractiveAdSpot inneractiveAdSpot, InneractiveUnitController.AdDisplayError adDisplayError) {
    }
    @Override
    public void onAdWillCloseInternalBrowser(InneractiveAdSpot inneractiveAdSpot) {
    }
    @Override
    public void onAdDismissed(InneractiveAdSpot inneractiveAdSpot) {
    }
});
```

{% endcode %}

#### Video Events: <a href="#h_01hvkbkvnewvpga227gdzbmdjr" id="h_01hvkbkvnewvpga227gdzbmdjr"></a>

{% code title="Java" %}

```java
videoContentController.setEventsListener(new VideoContentListener() {
    @Override
    public void onProgress(int totalDurationInMsec, int positionInMsec) {
    }
    @Override
    public void onCompleted() {
    }
    @Override
    public void onPlayerError() {
        /**
         * Note: onPlayerError callback method is deprecated starting from Marketplace v7.3.0,
         and won't be triggered when an error occurs.
         * Note: The SDK handles such errors internally and no further action is required.
         */
    }
});
```

{% endcode %}

#### Rewarded Events: <a href="#h_01k4w6d3ksbksg89sd3w8kacbx" id="h_01k4w6d3ksbksg89sd3w8kacbx"></a>

You can also use `InneractiveFullScreenAdRewardedListener` to receive Rewarded Ad callbacks.

{% code title="Java" %}

```java
controller.setRewardedListener(new InneractiveFullScreenAdRewardedListener() {
    @Override
    public void onAdRewarded(InneractiveAdSpot inneractiveAdSpot) {
    }
});
```

{% endcode %}

### Adding Request Listener for the Spot <a href="#id-01k7bwyagvyjxhj5dn88rshj9h" id="id-01k7bwyagvyjxhj5dn88rshj9h"></a>

The example below demonstrates how you would use a `RequestListener`:

{% code title="Java" %}

```java
InneractiveAdSpot.RequestListener mSpotListener = new InneractiveAdSpot.RequestListener() 
{
    @Override
//when the ad request sends successfully.
    public void onInneractiveSuccessfulAdRequest(InneractiveAdSpot inneractiveAdSpot) {
    }

    @Override
    public void onInneractiveFailedAdRequest(InneractiveAdSpot inneractiveAdSpot, InneractiveErrorCode inneractiveErrorCode) {
    }
};

mSpot.setRequestListener(mSpotListener);
```

{% endcode %}

## Fetching the Ad <a href="#id-01k7bwsy96q9gxdjhraahnyhs1" id="id-01k7bwsy96q9gxdjhraahnyhs1"></a>

The way in which the ad is fetched depends on the mediation type — Waterfall or SDK Bidding.

### Fetching the Ad for Waterfall <a href="#id-01k7bwsy96yt6t89qr6kgkvkhb" id="id-01k7bwsy96yt6t89qr6kgkvkhb"></a>

Use `InneractiveAdRequest adRequest` to set up the ad placement request:

{% code title="Java" %}

```java
InneractiveAdRequest adRequest = new InneractiveAdRequest("your_rewarded_spot_id");

// When ready to perform the ad request
mSpot.requestAd(adRequest);
```

{% endcode %}

Optionally, you can mute ads including `setMuteVideo(true)`:

{% code title="Java" %}

```java
InneractiveAdManager.setMuteVideo(true);
```

{% endcode %}

### Fetching the Ad for SDK Bidding <a href="#id-01k7bwvmvdmskc1pg3235dkw19" id="id-01k7bwvmvdmskc1pg3235dkw19"></a>

In SDK Bidding, DT Exchange must first generate a token for the Mediation SDK to use when identifying the request to the server.

Use `getBidderToken` to generate a Bidder Token in a background thread:

{% code title="Java" %}

```java
BidTokenProvider.getBidderToken();
```

{% endcode %}

Return type: `java.lang.String`. If an error occurs, the returned value is null.

If DT Exchange wins the auction, load the ad with the `signaldata (adm)` that was received from the server:

{% code title="Java" %}

```java
public void loadAd(String admPayload);
```

{% endcode %}

If the load is successful: `public void onInneractiveSuccessfulAdRequest(InneractiveAdSpot inneractiveAdSpot)` callback is invoked.

If the ad fails to load: `public void onInneractiveFailedAdRequest(InneractiveAdSpot inneractiveAdSpot, InneractiveErrorCode inneractiveErrorCode)` callback is invoked.

## Displaying the Ad <a href="#h_01hvkbkvne4v8pk5h0t1bx7ep5" id="h_01hvkbkvne4v8pk5h0t1bx7ep5"></a>

After a successful ad request, use `mSpot.isReady` to confirm the ad is ready and `controller.show(this);` to display the Ad:

{% code title="Java" %}

```java
// Check if we have ad content
if (mSpot.isReady()) {
// Get the spot's controller
    InneractiveFullscreenUnitController controller = (InneractiveFullscreenUnitController)mSpot.getSelectedUnitController();
// Show the ad using the Activity's context
    controller.show(this);
}
```

{% endcode %}

## Releasing an Ad Placement <a href="#releasing-an-a-d-placement-0-17" id="releasing-an-a-d-placement-0-17"></a>

DT recommends releasing the allocated resources for ad display. For more information, see [Releasing Ad Instance Resources](/dt-exchange/sdk-configuration/integrating-the-android-sdk/releasing-ad-instance-resources).


# Native Ads

Native ads are video or interactive ads that appear within the context of the user experience, such as in-feed sponsored content.

## Building the Ad Placement (Ad Spot) <a href="#h_01k83r5g5686erh7rkh5tvqmve" id="h_01k83r5g5686erh7rkh5tvqmve"></a>

Add the required controllers to set up the ad placement:

{% code title="Java" %}

```java
// Spot integration for native ad
InneractiveAdSpot mSpot = InneractiveAdSpotManager.get().createSpot();

// Adding the native controller
NativeAdUnitController adUnitController = new NativeAdUnitController();

// Adding the native video controller
NativeAdVideoContentController nativeAdVideoContentController = new NativeAdVideoContentController();

// Adding the native video controller to the ad unit controller
adUnitController.addContentController(nativeAdVideoContentController);
mSpot.addUnitController(adUnitController);
```

{% endcode %}

## Adding Listeners <a href="#h_01k83r5g56qryngr783gsksmrb" id="h_01k83r5g56qryngr783gsksmrb"></a>

Add listeners for the controller and the spot.

### Adding Event Listener for the Controller <a href="#h_01k83r5g56ngdd8tj304kavbdz" id="h_01k83r5g56ngdd8tj304kavbdz"></a>

The examples below demonstrate how you would add an `EventListener` to receive native ad callbacks.

#### Events: <a href="#h_01k83r5g56vfrzh52d8cr9n6gm" id="h_01k83r5g56vfrzh52d8cr9n6gm"></a>

{% code title="Java" %}

```java
adUnitController.setEventsListener(new NativeAdEventsListenerWithImpressionData() {
  @Override
  public void onAdImpression(InneractiveAdSpot adSpot, ImpressionData impressionData) { }

  @Override
  public void onAdImpression(InneractiveAdSpot adSpot) { }

  @Override
  public void onAdClicked(InneractiveAdSpot adSpot) { }

  @Override
  public void onAdWillCloseInternalBrowser(InneractiveAdSpot adSpot) { }

  @Override
  public void onAdWillOpenExternalApp(InneractiveAdSpot adSpot) { }
});
```

{% endcode %}

#### Video Events: <a href="#h_01k83r5g56wnrtf7b65fqyb5fy" id="h_01k83r5g56wnrtf7b65fqyb5fy"></a>

{% code title="Java" %}

```java
nativeAdVideoContentController.setEventsListener(new VideoContentListener() {
  @Override
  public void onProgress(int totalDurationInMsec, int positionInMsec) {
                
  }

  @Override
  public void onCompleted() {

  }

  @Override
  public void onPlayerError() {

  }
});

adUnitController.addContentController(nativeAdVideoContentController);
```

{% endcode %}

### Adding Request Listener for the Spot <a href="#h_01k83r5g56b7yc9qd607gfqks2" id="h_01k83r5g56b7yc9qd607gfqks2"></a>

The example below demonstrates how you would add a `RequestListener` for the Spot:

{% code title="Java" %}

```java
InneractiveAdSpot.NativeAdRequestListener spotListener = new InneractiveAdSpot.NativeAdRequestListener() {
  // When the ad loaded successfully
  @Override
  public void onInneractiveSuccessfulNativeAdRequest(InneractiveAdSpot adSpot, NativeAdContent adContent) {
  // Native ad is ready
  adContent.bindMediaView(new MediaView(applicationContext));
    
  populateNativeAdLayout(adContent);  
  registerViewsForInteraction(adContent);
  }
  // When the ad request fails to send
  @Override
  public void onInneractiveFailedAdRequest(InneractiveAdSpot adSpot, InneractiveErrorCode errorCode) {
  // Handle ad request failure
  }
};

mSpot.setRequestListener(spotListener);
```

{% endcode %}

## Fetching the Ad <a href="#h_01k83r5g56wgkfeaw56fabj18v" id="h_01k83r5g56wgkfeaw56fabj18v"></a>

Native ads are only available through SDK Bidding mediation. In SDK Bidding, DT Exchange must first generate a token for the Mediation SDK to use when identifying the request to the server.

Use `getBidderToken` to generate a Bidder Token in a background thread:

{% code title="Java" %}

```java
BidTokenProvider.getBidderToken();
```

{% endcode %}

Return type: `java.lang.String`. If an error occurs, the returned value is null.

If DT Exchange wins the auction, load the ad with the `signaldata (adm)` that was received from the server:

{% code title="Java" %}

```java
mSpot.loadAd(adm);
```

{% endcode %}

Optionally, you can mute ads by including `setMuteVideo(true)`:

{% code title="Java" %}

```java
InneractiveAdManager.setMuteVideo(true);
```

{% endcode %}

## Displaying the Ad <a href="#h_01k83r5g56b2qm9zmbgzz1g9wt" id="h_01k83r5g56b2qm9zmbgzz1g9wt"></a>

Define the ad layout in your XML file:

{% code title="XML" %}

```xml
<LinearLayout>
  <ImageView android:id="@+id/ad_icon"/>
  <LinearLayout>
    <TextView android:id="@+id/ad_title"/>
    <TextView android:id="@+id/ad_description"/>
    <RatingBar android:id="@+id/ad_rating"/>
  </LinearLayout>
</LinearLayout>


<FrameLayout
  android:id="@+id/media_view_container"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  app:layout_constraintHeight_min="<SET_HEIGHT>"/>	
    
<Button android:id="@+id/ad_cta_btn"/>
</androidx.constraintlayout.widget.ConstraintLayout>
```

{% endcode %}

Use `populateNativeAdLayout` to create the Native layout:

{% code title="Java" %}

```java
public void populateNativeAdLayout(NativeAdContent content) {
	
LayoutInflater inflater = LayoutInflater.from(context);
       adView = (ViewGroup) inflater.inflate(R.layout.native_ad_layout, null))

String adTitle = content.getAdTitle();
String adDescription = content.getAdDescription();
Uri appIconUri = content.getAppIcon();
String callToAction = content.getAdCallToAction();
Float rating = content.getRating();
MediaView mediaView = content.getMediaView();
Float aspectRatio = content.getMediaAspectRatio();

// Bind to native ad layout view e.g.:
// ImageView iconImageView = adView.findViewById(R.id.ad_icon);
// iconImageView.setImageURI(appIconUri);
// FrameLayout mediaViewContainer = adView.findViewById(R.id.media_view_container);
// mediaViewContainer.addView(mediaView);
}
```

{% endcode %}

For a list of supported Native Ads asset types, see the [oRTB Specification for Native Ads](https://gitlab.com/digitalturbine/dt-developer-portal/gitbook/-/blob/main/14_exchange_dsp/dt-exchange-openrtb-2.5-specs#object-native).

Use `registerViewsForInteraction` to enable user interaction with the Native ad and register tracking events:

{% code title="Java" %}

```java
public void registerViewsForInteraction(NativeAdContent content) {
  adView.setTag(NativeAdContent.ViewTag.ROOT);
  content.getMediaView().setTag(NativeAdContent.ViewTag.MEDIA_VIEW);
  iconImageView.setTag(NativeAdContent.ViewTag.AD_ICON);
  ctaButton.setTag(NativeAdContent.ViewTag.CTA);
  ratingView.setTag(NativeAdContent.ViewTag.RATING);
  descriptionTextView.setTeg(NativeAdContent.ViewTag.AD_DESCRIPTION);
  titleTextView.setTag(NativeAdContent.ViewTag.AD_TITLE);
	
  content.registerViewsForInteraction(rootViewGroup, content.getMediaView(), iconImageView, 
    Arrays.asList(ctaButton, ratingView, adDescription, adTitle));
}
```

{% endcode %}

## Releasing an Ad Placement <a href="#releasing-an-a-d-placement-0-17" id="releasing-an-a-d-placement-0-17"></a>

DT recommends releasing the allocated resources for ad display. For more information, see [Releasing Ad Instance Resources](/dt-exchange/sdk-configuration/integrating-the-android-sdk/releasing-ad-instance-resources).


# Dynamic Floor Pricing

{% hint style="warning" %}
This feature requires explicit enablement by DT.\
Please contact your DT Commercial Representative before using this feature. If the feature is used without proper enablement, it may not work as expected.
{% endhint %}

Setting a dynamic floor price allows you to establish a custom price for your ad requests. To configure a floor price, call `setFloorPrice` with a double value representing the custom floor price in USD, as described in the following example:

{% code title="Java" %}

```java
InneractiveAdRequest adRequest = new InneractiveAdRequest("add_your_spot_id"); 
adRequest.setFloorPrice(3.14);
```

{% endcode %}

{% hint style="info" %}
Submit the `setFloorPrice` value in CPM (cost per 1000 impressions), not per single impression.
{% endhint %}


# User Signals API

As of DT Exchange Android SDK version 8.4.2, publishers can submit first-party data (user signals) such as The Trade Desk UID2 tokens and LiveRamp envelopes. Submitting user signals provides DT with deeper insights into user behavior and publisher-specific metrics so that we can better target ads to your users and increase fill rates. Additionally, if you are mediating DT Exchange, implementation of User Signals remains the same, no matter which mediation platform you use.

To submit user signals:

1. Ensure that you have integrated the latest DT Exchange Android SDK.\
   For the latest version, see [Integrating the Android SDK](/dt-exchange/sdk-configuration/integrating-the-android-sdk).
2. For each [user signal](#h_01kd871ggetf9pv4c9pap41ygn) you want to submit, send the data as key-value pairs in the [`setExtraData` method ](#h_01kd871ggesvzdp618sc6d0r33)within the `InneractiveAdManager`.

{% hint style="info" %}

* To pass multiple user signals, call the method once for every data point you wish to send.
* Calling the `setExtraData` method with a key that has already been sent overwrites the previous value associated with that key.
  {% endhint %}

## Method Signature <a href="#h_01kd871ggesvzdp618sc6d0r33" id="h_01kd871ggesvzdp618sc6d0r33"></a>

{% code title="Java" %}

```java
public static void setExtraData(String key, String value)
```

{% endcode %}

## User Signals <a href="#h_01kd871ggetf9pv4c9pap41ygn" id="h_01kd871ggetf9pv4c9pap41ygn"></a>

Submit any of the following user signals as key-value pairs in the `setExtraData` method. The maximum value you can send is 512 characters.

| KEY  | VALUE                                                          |
| ---- | -------------------------------------------------------------- |
| UID2 | UID2.0 token from The Trade Desk                               |
| LRE  | <p>LiveRamp envelope.</p><p>Do not submit the LiveRamp ID.</p> |

## Example <a href="#h_01kd871ggee5nwxr3d8w69g4tk" id="h_01kd871ggee5nwxr3d8w69g4tk"></a>

{% code title="Java" %}

```java
  // Passing the first user signal

  InneractiveAdManager.setExtraData("UID2", "UID2.0_access_token");

  // Passing the second user signal

  InneractiveAdManager.setExtraData("LRE", "LiveRamp_envelope");
```

{% endcode %}

<br>


# Impression Level Data

DT Exchange enables you to access detailed information for each impression through the impressions callback APIs. The information includes, for example, which demand source served the ad and its expected or exact revenue.

The following table describes Impression Level Data attributes.

| Property Name      | Description                                                                                                                                                                                                                                                                                                                |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `advertiserDomain` | A unique identifier for a set of campaigns for the same advertiser.                                                                                                                                                                                                                                                        |
| `campaignId`       | A unique identifier that represents a Campaign.                                                                                                                                                                                                                                                                            |
| `creativeId`       | <p>A unique identifier that represents the creative in the bid response.<br>This can be useful when a particular creative causes user experience issues.</p>                                                                                                                                                               |
| `country`          | Identifier of the country of the ad impression (in ISO country code).                                                                                                                                                                                                                                                      |
| `impressionId`     | A unique identifier for a specific impression.                                                                                                                                                                                                                                                                             |
| `demandSource`     | <p>Identifies the demand source name of the buy-side/demand-side entity that purchased the impression:<br></p><ul><li>When mediated networks win an impression, the mediated network's name appears.</li><li>When a DSP buying through the programmatic marketplace wins the impression, the DSP's name appears.</li></ul> |
| `pricing`          | Object includes two properties about the impression's pricing, net payout value, and currency type.                                                                                                                                                                                                                        |
| `Pricing.value`    | The impression's net payout value.                                                                                                                                                                                                                                                                                         |
| `Pricing.currency` | The impression's currency type.                                                                                                                                                                                                                                                                                            |
| `video`            | <p>Object includes two properties about the video: duration and skippable.<br>The object is null for non-video impressions.</p>                                                                                                                                                                                            |
| `Video.skippable`  | An indication of whether the video is skippable or not. Possible values: `true`, `false`.                                                                                                                                                                                                                                  |
| `Video.duration`   | The duration of the video in seconds, for example, 15 seconds.                                                                                                                                                                                                                                                             |

## Receiving Per-Ad Impression Data <a href="#h_01jydrqmq277e0sctsz1x24rkh" id="h_01jydrqmq277e0sctsz1x24rkh"></a>

All unit controllers allow you to access the `ImpressionData` object through their callback APIs, using an `Event Listener` subclass with a suffix of `WithImpressionData`.

The example below showcases how you can access these data on a full screen placement integration

### InneractiveAdViewUnitController <a href="#h_01jye40q7mgyzfzb1c3fjv1sz5" id="h_01jye40q7mgyzfzb1c3fjv1sz5"></a>

{% code title="Java" %}

```java
InneractiveAdViewUnitController controller = 
    (InneractiveAdViewUnitController) bannerSpot.getSelectedUnitController();

controller.setEventsListener(
    new InneractiveAdViewEventsListenerWithImpressionData() {
        @Override
        public void onAdImpression(InneractiveAdSpot adSpot, ImpressionData impressionData) {
            Log.v("ImpressionData", impressionData.toString());
        }

        // … all other callbacks and methods
    }
);
```

{% endcode %}

### InneractiveFullscreenUnitController <a href="#h_01jye445d5kmwpsv7vhh6vjbh9" id="h_01jye445d5kmwpsv7vhh6vjbh9"></a>

{% code title="Java" %}

```java
InneractiveFullscreenUnitController fullscreenUnitController = 
    (InneractiveFullscreenUnitController) fullScreenSpot.getSelectedUnitController();

fullscreenUnitController.setEventsListener(
    new InneractiveFullscreenAdEventsListenerWithImpressionData() {
        
        @Override
        public void onAdImpression(InneractiveAdSpot adSpot, ImpressionData impressionData) {    
            Log.v("ImpressionData", impressionData.toString());
        }
        
        // … all other callbacks and methods

    }
);
```

{% endcode %}

## Receiving Impression Data Globally <a href="#h_01jydrqmq2he82mchdd1mhr25w" id="h_01jydrqmq2he82mchdd1mhr25w"></a>

In addition to the per-ad callback, this listener also contains details about the relevant Placement ID (spot ID) and Unit ID.

{% code title="Java" %}

```java
void OnGlobalImpressionDataListener.onImpression(
    String spotId, 
    String unitId, 
    ImpressionData impressionData
);
```

{% endcode %}

{% hint style="warning" %}
The static impression data listener holds a hard reference, which might cause memory leaks if you use it incorrectly.

DT recommends using the relevant `InneractiveAdManager.clearImpressionDataListener()` method when global ad impression data is no longer required.

{% code title="Java" %}

```java
InneractiveAdManager.setImpressionDataListener(new OnGlobalImpressionDataListener() {
    @Override
    public void onImpression(String spotId, String unitId, ImpressionData impressionData) {
        Log.v("impressionStaticData", 
              "spotId: " + spotId + 
              ", unitId: " + unitId + 
              ", impressionData: " + impressionData);
    }
});
```

{% endcode %}
{% endhint %}


# Releasing Ad Instance Resources

After an ad shows, DT recommends releasing the resources used to show it. Releasing ad instance resources ensures efficient memory usage, prevents resource leaks, and supports proper lifecycle management.

Release the ad instance when:

* The app destroys the hosting screen or component.
* The ad no longer runs in the current session.
* The screen containing the ad is no longer visible.
* A new ad instance replaces the existing one.

The following example removes all views from the ad container and destroys the ad instance.

{% code title="Java" %}

```java
if (adContainer != null) {
  ​adContainer.removeAllViews();​
  adContainer = null;​
}​​
if (mSpot != null) {
  ​mSpot.destroy();​
  mSpot = null;​
}
```

{% endcode %}

{% code title="Kotlin" %}

```kotlin
adContainer?.removeAllViews()
adContainer = null

mSpot?.destroy()
mSpot = null
```

{% endcode %}


# DT Exchange Logging on Android

The DT Exchange Android SDK includes a built-in logging utility, `InneractiveAdManager.setLogLevel`, that monitors SDK behavior and streamlines integration debugging. You can control how much detail appears in the console output by setting the desired log level.

Set the log level before or immediately after calling `InneractiveAdManager.initialize()` to ensure that initialization events are logged.

The following table describes the log level attributes.

| Property Name                                                | Description                                                                    |
| ------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| `Log.INFO`                                                   | Default Setting. Enables all logs.                                             |
| `Log.WARN`                                                   | <p>Enables warnings and errors.<br>Use this for production.</p>                |
| <p><code>Log.VERBOSE</code></p><p><code>Log.DEBUG</code></p> | <p>Enables detailed logs.<br>Use this for development and troubleshooting.</p> |

## Setting the Log Level

To configure the library's logging level, call `InneractiveAdManager.setLogLevel` and pass the desired log level.\
The following example initializes the SDK and then sets the log level to `Log.VERBOSE`:

{% code title="Java" %}

```java
InneractiveAdManager.initialize(context, appId, new OnFyberMarketplaceInitializedListener() {
@Override
public void onFyberMarketplaceInitialized(FyberInitStatus status) {
if (status == FyberInitStatus.SUCCESSFULLY) {
Log.d("DTExchange", "DTExchange init success");
} else {
Log.e("DTExchange", "DTExchange init failed: " + status);
}
}
});
// Set the desired log level
// Use Log.VERBOSE for full logs during development
InneractiveAdManager.setLogLevel(Log.VERBOSE);
```

{% endcode %}

{% code title="Kotlin" %}

```kotlin
InneractiveAdManager.initialize(context, appId) { status ->
if (status == FyberInitStatus.SUCCESSFULLY) {
Log.d("DTExchange", "DTExchange init success")
} else {
Log.e("DTExchange", "DTExchange init failed: $status")
}
}
// Set the desired log level
// Use Log.VERBOSE for full logs during development
InneractiveAdManager.setLogLevel(Log.VERBOSE)
```

{% endcode %}


# DT Exchange Android Changelog

> Get the [latest DT Exchange Android SDK](/dt-exchange/sdk-configuration/integrating-the-android-sdk).

{% updates format="full" %}
{% update date="2026-07-28" %}

## Version 8.4.7

**New:**

* Update `targetSdkVersion` to 36
* Resolved Google Play large-screen compatibility warning for fullscreen ads
* Added mute support for Native ads

**Fixed**:

* Various stability fixes and improvements
  {% endupdate %}

{% update date="2026-06-30" %}

## Version 8.4.6

**New**:

* Increased the minimum SDK level to 23
* Minimum Kotlin version 2.1.0
* Removed deprecated API `InneractiveUserConfig setAge`

**Fixed**:

* Various stability fixes and improvements
  {% endupdate %}

{% update date="2026-04-29" %}

## Version 8.4.5

**New:**

* Added support for [Vietnam's Amended Law on Advertising](/dt-exchange/getting-started-with-dt-exchange/privacy/vietnams-amended-law-on-advertising)
  {% endupdate %}

{% update date="2026-03-29" %}

## Version 8.4.4

**New:**

* Added Support for [IAB’s Global Privacy Platform (GPP)](https://iabtechlab.com/gpp/) for EU countries and the US

**Fixed:**

* Crash related to concurrent SDK initializations:\
  `java.lang.NullPointerException:`\
  `Attempt to invoke virtual method 'java.lang.String java.lang.Throwable.getLocalizedMessage()`
* Changed Native video ads cache directory name to prevent conflicts with host app assets
  {% endupdate %}

{% update date="2026-02-11" %}

## Version 8.4.3

**Fixed**:

* Various stability fixes and improvements

**Deprecated**:

* `InneractiveUserConfig setAge`
  {% endupdate %}

{% update date="2025-12-24" %}

## Version 8.4.2

**New:**

* Added [new API](/dt-exchange/sdk-configuration/integrating-the-android-sdk/user-signals-api) to `InneractiveManager:` \[Developer Preview]

```java
public static void setExtraData(String key, String value)
```

**Improvements:**

* Use `IABTCF_gdprApplies` flag to determine if we should read TCF values on device

**Fixed:**

* Various stability fixes and improvements
  {% endupdate %}

{% update date="2025-11-18" %}

## Version 8.4.1

**New:**

* Added [new API](/dt-exchange/sdk-configuration/integrating-the-android-sdk/dynamic-floor-pricing-developer-preview) to `InneractiveAdRequest` \[Developer Preview]

```java
public void setFloorPrice(double price)
```

{% endupdate %}

{% update date="2025-10-05" %}

## Version 8.4.0

**New:**

* Added support for Native Ads
  {% endupdate %}

{% update date="2025-07-24" %}

## Version 8.3.8

**Improvements:**

* Increased the minimum SDK level to 19
* Support MRAID videos in MREC
* Updated OMSDK to v1.5.4

**Fixed:**

* Various stability fixes
  {% endupdate %}

{% update date="2025-04-14" %}

## Version 8.3.7

**Improvements:**

* Playable full-screen ads improvements
* VAST Companion improvements
* Removed AppSetId collection

**Fixed:**

* Crash related to a certain scenario of VAST ads: `java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first`
* Crash related to webview on certain devices: `java.lang.NullPointerException: Attempt to invoke interface method'java.lang.String org.chromium.content_public.browser.WebContents.getUrl()' on a null object reference`
* Various stability fixes
  {% endupdate %}

{% update date="2025-02-09" %}

## Version 8.3.6

**New:**

* Enhanced VAST ads experience

**Improvements:**

* Ad rendering in edge-to-edge mode on Android 15 devices

**Fixed:**

* Various stability fixes
  {% endupdate %}

{% update date="2025-01-14" %}

## Version 8.3.5

**Fixed:**

* Fixed usage of Android Advertising ID to be compliant with [Google Play Ads policy](https://support.google.com/googleplay/android-developer/answer/9857753)
  {% endupdate %}

{% update date="2024-12-25" %}

## Version 8.3.4

**Improvements:**

* Improved display ads rendering
* Improved full-screen ads rendering

**Fixed:**

* An issue with redirect URLs that contain `FYBER_OPEN_BROWSER`
* Encoding issue with tracking events in `iframe` and GIF `endcards`
* Possible memory leak
* Possible crash related to `play-services-ads-identifier:18.2.0` on devices running Android 7 and earlier
* Various stability fixes and improvements
  {% endupdate %}

{% update date="2024-11-05" %}

## Version 8.3.3

**Fixed:**

* Possible `ClassCastException` crash related to loading VAST ads in Waterfall
  {% endupdate %}

{% update date="2024-10-21" %}

## Version 8.3.2

**New:**

* Added support for Android Privacy Sandbox - [Topics API](https://developers.google.com/privacy-sandbox/private-advertising/topics/android):

```
<uses-permission android:name="android.permission.ACCESS_ADSERVICES_TOPICS" />
```

* Added support for Android Privacy Sandbox - [Attribution Reporting API](https://developers.google.com/privacy-sandbox/private-advertising/attribution-reporting/android):

```
<uses-permission android:name="android.permission.ACCESS_ADSERVICES_ATTRIBUTION" />
```

* Added support for [AppSetId](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/appsetid/AppSetId) collection
* Added support for VAST “skip” tracking event
* Update targetSdkVersion to 35
* Set Java source and target compatibility to 1.8 (Java 8)

**Improvements:**

* VAST companion UX improvements

**Fixed:**

* Various stability fixes and improvements
  {% endupdate %}

{% update date="2024-08-22" %}

## Version 8.3.1

**Improvements:**

* Improved viewability detection of banner ads
  {% endupdate %}

{% update date="2024-07-25" %}

## Version 8.3.0

**New:**

* Added support for resource-less companion click tracking
* Added support for DV360 with Admob v23+
* Updated OMSDK to v1.5.0
* Removed setKeywords API (deprecated since v8.0.0)
* Added support for reading TCF purpose consent values

**Improvements:**

* VAST video UX improvements

**Fixed:**

* Various stability fixes and improvements
  {% endupdate %}

{% update date="2024-04-09" %}

## Version 8.2.7

**New:**

* Added support for reading TCF v2 consent values
* Added support for muteVideo API for rewarded placements

**Improvements:**

* Added enhancements for DSA support

**Fixed:**

* Various stability fixes and improvements
  {% endupdate %}

{% update date="2024-02-13" %}

## Version 8.2.6

**Fixed:**

* Various stability fixes and improvements
  {% endupdate %}

{% update date="2023-12-14" %}

## Version 8.2.5

**New:**

* Updated OMSDK to v1.4.9

**Fixed:**

* Improved handling of WebView crashes
* Fixed Possible memory leak
* Various stability fixes and improvements
  {% endupdate %}

{% update date="2023-09-05" %}

## Version 8.2.4

**New**:

* Added support for VAST V3 progress tracking events
* Updated OMSDK to v1.4.8

**Improvements**:

* Ads loading improvements

**Fixed**:

* Possible crash and init error related to 3rd party SDK
* Possible ANR related to video UI
* Various stability fixes and improvements
  {% endupdate %}

{% update date="2023-04-04" %}

## Version 8.2.3

**New**:

* Support Android 13 Predictive Back
* Stop collecting GPS data

**Fixed**:

* Crash related to Google Mobile Ads SDK v22.0.0
* Various stability fixes and improvements
  {% endupdate %}

{% update date="2023-02-14" %}

## Version 8.2.2

**New**:

* Support for HTML Video within OMSDK
* Update OMSDK to v1.4.2
* Improved rendering logic for brand campaigns

**Fixed**:

* Various stability fixes and improvements
  {% endupdate %}

{% update date="2022-11-15" %}

## Version 8.2.1

**New**:

* Added [API](/dt-exchange/sdk-configuration/integrating-the-android-sdk#google-play-families-a-ds-api) support for child audience

`InneractiveAdManager.currentAudienceIsAChild()`

* Pending features for Google’s Designed for Families program
* DT Exchange ad identifier icon (i)

**Fixed**:

* Muted Strict Mode violation related to app context
* Various stability fixes and improvements
  {% endupdate %}

{% update date="2022-08-29" %}

## Version 8.2.0

**New**:

* Added support for integration with DT Ignite SDK

**Fixed**:

* Various stability fixes and improvements
  {% endupdate %}

{% update date="2022-06-27" %}

## Version 8.1.5

**Fixed**:

* Wrong package prefixes in the minified SDK which may have caused conflicts with other minified packages in the hosting app
  {% endupdate %}

{% update date="2022-06-15" %}

## Version 8.1.4

**New**:

* Added new API and support for LGPD (Brazilian GDPR)

**Fixed**:

* Fixed a possible ANR related to device input languages
* Various stability fixes and improvements
* Fixed conflict with 3rd party SDK

**Improvements**:

* Update OMSDK to 1.3.30
  {% endupdate %}

{% update date="2022-02-27" %}

## Version 8.1.3

**Fixed**:

* Possible ANR related to OM SDK initialization
* Crash related to a 3rd party SDK that overrides our network stack and causes a failure when parsing ad response

**Improvements**:

* Removed old media cache which had an open localhost socket listening on a random high port. As such, having a localhost exception role in the network security config is no longer required.
* Various stability fixes and improvements
  {% endupdate %}

{% update date="2021-12-30" %}

## Version 8.1.2

**Fixed:**

* Crash related to showing Interstitial Ads on tablets
  {% endupdate %}

{% update date="2021-12-29" %}

## Version 8.1.1

**New**:

* Support for OMSDK v1.3.28

**Fixed**:

* Click issue with fullscreen ads calling MRAID expand command
* Rendering issue after refresh in Unity
* Various crashes related to OMSDK
* Various stability fixes and improvements
  {% endupdate %}

{% update date="2021-11-04" %}

## Version 8.1.0

**New**:

* Added support for (Open Measurement) OMSDK v1.3.25

**Fixed**:

* Possible ANR caused by `getActiveNetworkInfo`
* Miscellaneous stability improvements
  {% endupdate %}

{% update date="2021-10-18" %}

## Version 8.0.0

**New**:

* Added support for SDK Bidding

**Improvements**:

* Unified SDK kits and core modules into a single library. The library name is:

`marketplace-sdk`

{% hint style="info" %}
This replaces the previous versions dependency, and is mandatory for the integration.
{% endhint %}

In build.gradle

```groovy
def fyberMarketplaceVersion = '8.0.0'

dependencies {
       // ...
      implementation "com.fyber:marketplace-sdk:${fyberMarketplaceVersion}"
      // ...
}
```

**Fixed**:

* Internal SDK race condition that caused a crash
* Crash related to low memory on device
* Various improvements and bug fixes

**Deprecated and API Updates**:

* API moved from InneractiveAdRequest to InneractiveAdManager to be globally supported for all ad requests
* `InneractiveAdRequest UserParams:`

```java
@Deprecated
public void setUserParams(InneractiveUserConfig userParams)
@Deprecated
public InneractiveUserConfig getUserParams()
```

Please use the following in InneractiveAdManager:

```java
public static void setUserParams(InneractiveUserConfig userParams)
public static InneractiveUserConfig getUserParams()
```

* `InneractiveAdRequest Keywords`

```java
@Deprecated
public void setKeywords(String keywords)
@Deprecated
public String getKeywords()
```

Please use the following in InneractiveAdManager:

```java
@Deprecated
public static void setKeywords(String keywords)
@Deprecated
public static String getKeywords()
```

* The support for Keywords is about to be completely removed, therefore it is also deprecated in InneractiveAdManager
* For muting support, the following has changed:

```java
InneractiveAdRequest MuteVideo
@Deprecated
public void setMuteVideo(boolean muteVideo)
@Deprecated
public boolean getMuteVideo()
```

* And is replaced with InneractiveAdManager:

```java
public static void setMuteVideo(boolean muteVideo)
public static boolean getMuteVideo()
```

{% endupdate %}

{% update date="2021-08-17" %}

## Version 7.8.4

**New**:

* Added support for DV360 SCAR integration for full screen ads
* **Important API change**: To display full screen ads, pass activity to `InneractiveFullscreenUnitController show method`:

```
public void show(Activity activity)
```

* Added a new API to determine if location API is used in the SDK. Default value is set to true

```
InneractiveAdManager.setUseLocation(boolean useLocation)
```

**Improvements**:

* Loading time of playable ads
* Made improvements to ad load time for apps using SafeDK

**Fixed**:

* Ignore MRAID expand command in full screen ads
* Various improvements and bug fixes
  {% endupdate %}

{% update date="2021-06-09" %}

## Version 7.8.3

**New**:

* Rewarded Videos longer than 30 seconds will now be accepted on Fyber Marketplace and a skip button will be displayed at the 30-second mark

**Fixed**:

* Rare internal SDK race condition that caused no impression callback to be invoked in VAST creatives
* Possible ANR related to GMS QueryInfo
* Bug that caused some image end cards in full screen ads to not display
* MRAID open errors will now include a proper error message
* spot.isReady() will now properly return true when a SCAR API Banner is ready to render
* Stability and Crash issues fixed

**Improvements**:

* Removed VPAID support
* SDK will no longer crash when calling bind() on an Ad View instance which returned isReady() equals false
  {% endupdate %}

{% update date="2021-03-18" %}

## Version 7.8.2

**Improvements**:

* Added support for DV360 SCAR integration for banners
* Updated support for MoPub's latest Adapter version 5.16.0
* Updated support for AdMob's latest Adapter version 19.7.0
* Updated SDK maven repository to maven-central
  {% endupdate %}

{% update date="2021-02-11" %}

## Version 7.8.1

**New**:

* Enhanced video skippability enforcement mechanism
* Enhanced user experience with larger video button controls on tablets

**Fixed**:

* Improved handling of deeplink URLs
* Crash related to memory allocation
* Various bug fixes
  {% endupdate %}

{% update date="2021-01-19" %}

## Version 7.8.0

**New**:

* Added additional Contextual parameters and improved the infrastructure
* Redesigned our network stack implementation with significant improvements. Impacts all network communications (i.e ad requests, tracking events, and more)
* Ignore unsupported spots ad requests (i.e. support videos only for Interstitial and Rewarded)
* Increased Target APIs to Android 10, to meet Google Play’s [Target API Level Requirements](https://support.google.com/googleplay/android-developer/answer/113469#targetsdk)

**Fixed**:

* Various crashes related to MRAID and VPAID
* Crash in Mopub Banner Adpater
* Issue where video player icons were cropped on some devices
* Miscellaneous improvements and stability fixes
  {% endupdate %}

{% update date="2020-11-26" %}

## Version 7.7.4

**Fixed**:

* Fixed a crash in banners when calling bindView for a webview which crashed
  {% endupdate %}

{% update date="2020-11-01" %}

## Version 7.7.3

**New**:

* Added support for the mute API in FairBid

**Fixed**:

* Deployed a patch to prevent the SDK crashing when a publisher accidentally requested an interstitial placement using an adview integration, in rare cases.
  {% endupdate %}

{% update date="2020-10-14" %}

## Version 7.7.2

**Fixed**:

* Issue in the video player which might cause the Marketplace SDK to crash in certain rare scenarios
  {% endupdate %}

{% update date="2020-10-07" %}

## Version 7.7.1

**New**:

* Added new internal testing capabilities to monitor and optimize for faster ad load times
* User interface updates targeting increased user engagement
  * (Video CTA now lists “Install Now” instead of “Visit Us”)
  * For full screen display ads, users are now taken back to the ad after visiting the destination page, previously the ad was dismissed
* Added support for granular click tracking on end cards (CompanionClickTracking) and support for multiple CompanionClickTrack elements
* Added additional VAST functionality that improves click tracking and helps mitigate accidental clicks

**Fixed**:

* Fix for MRAID currentPosition in rotations
* Fixed an issue where our banner click handler may fail
* Misc. improvements and stability fixes
  {% endupdate %}

{% update date="2020-08-25" %}

## Version 7.7.0

**New**:

* Added a new API for passing the developer’s own user ID - “InneractiveAdManager.setUserId(String)”. We recommend using this API to improve buyers ability to target and frequency cap.
* Added support for VAST 3.0 `CompanionClickTracking`

**Fixed**:

* MRAID 2.0 now properly populates the getCurrentPosition method
* Stability and performance improvements

**Notes**:

* New privacy-oriented Contextual Targeting parameters
  {% endupdate %}

{% update date="2020-08-06" %}

## Version 7.6.1

**New Features**:

* Ads will be invalidated when expired.
* Added support for testing Rewarded Placement Types in the test app

**Fixed**:

* When a bad App ID is entered, in some situations, the SDK has had issues recovering when a correct one is inserted in the same session
* An anti-virus product named “Zoner” has falsely flagged the SDK as containing “HTML.RefreshScript” using an heuristic detection method, We have adjusted the relevant code to remove any doubt.
* Fraud detection now works on HTML End Cards
* Various stability fixes and improvements

**Updates**:

* When a VAST contains a mix of VPAID and regular media files, VPAID will now be in the lowest priority
* Improved VAST End Card logic (filtering of sizes)
* FairBid bridge now supports the new rewarded display format and the isReady/available methods
* Demand Test app now includes a better log collector for debugging remote issues
* Test app now shows a logger instead of toast messages
  {% endupdate %}

{% update date="2020-07-12" %}

## Version 7.6.0

**Features**:

* New ad format! Added support for Rewarded Playables, which is configured under the existing Rewarded Placement Type
* Added a new rewarded completion callback for fullscreen unit controllers.
* Improved click handling for interstitial display Ad Units
* Improved the look and feel of the fail-safe close button

**Fixed**:

* Unified the timing of the close and back button with iOS across all placement types
* Minor stability and performance improvements
  {% endupdate %}

{% update date="2020-05-21" %}

## Version 7.5.4

**Updates**:

* Newer user experience for full screen ads - as these now take advantage of immersive mode to render on the whole screen
* SDK initialized callback.
* The SDK now takes advantage of the “onRenderProcessGone” WebViewClient API to avoid WebView related crashes. In such, the SDK will invoke the appropriate “onAdEnteredErrorState” callback with a “WebViewRendererProcessHasGoneError” object.

**Fixed**:

* Improved the SDK handling of invalid VAST End cards:
  * When the content of an end card is empty
  * The SDK will attempt to reload the end cards upon failure
  * Invalid / Erroneous file extension and mime-types such as case-insensitive “JPG”
* Banner refresh logic has been slightly adjusted to refresh banners when app resumes from background
* Video ads loading logic has been adjusted for better performance.
* Miscellaneous bug fixes and stability improvements
  {% endupdate %}

{% update date="2020-03-29" %}

## Version 7.5.3

**Updates**:

* The minimum Android API version is set to 16 (Android OS 4.1, Jelly Bean)

**Fixed**:

* Potential crash when calling webview getSettings API
* The onInneractiveFailedAdRequest wasn’t called when a banner spot was used to load full-screen ad
* Additional stability fixes and improvements
* Deep Links of type "intent" with a fallback URL will open the fallback URL, if the target application is not installed on the device
  {% endupdate %}

{% update date="2020-02-27" %}

## Version 7.5.2

**Updates**:

* The CCPA Setter renamed to 'setUSPrivacyString'
* Support added for CompanionClickTracking
* Fullscreen activity now requires hardware acceleration. No developer action required
* Improved deep link handling
* New ‘video load timeout’ reason code added in the failure callback

**Fixed**:

* Additional stability fixes and improvements
  {% endupdate %}

{% update date="2020-01-14" %}

## Version 7.5.0

**Updates**:

* New “static” ad impression level revenue data callback which allows to receive information regarding all impressions being shown with the Marketplace SDK
* New API for setting a CCPA (us\_privacy) string
* VPAID is now supported in the mute API
* When hosting activity has a launch mode of “singleTask” ads displayed will now properly dismiss when required

**Fixed**:

* Click logic has been revised
* Fixed a crash related to the cancelling of ad requests in very particular timings.
* Fixed a potential crash in the video cache mechanism
* Stability and performance improvements
  {% endupdate %}

{% update date="2019-12-18" %}

## Version 7.4.1

**Updates**:

Removed the GSON dependency

**Fixed**:

* Crash in debug mode due to removal of GSON
* Crash when the Spot is destroyed while the Ad is being loaded
  {% endupdate %}

{% update date="2019-12-09" %}

## Version 7.4.0

**Updates**:

* Using ExoPlayer for rendering VAST ads
* New optional API - start interstitial video ads muted for apps with sound settings off (except for rewarded video ad unit)

**Fixed**:

* Improved rendering of full screen html ads
* Improved handling of Google Play click URLs inside the ad
* Interstitial ads cannot be dismissed before given an opportunity to be visible to the user
* Full screen interstitials display ads are not scrollable
* Intent scheme is properly sent to the operating system
* The SDK will no longer send ad requests when only the core kit is being used.
* Fixed a possible ANR on devices running Android 5.x
* Renamed a package which was possibly conflicting with other open source package names.
* Fixed a possible class cast exception when requesting ads

**Adapters**:

* Mopub adapter - fixed a possible memory leak
  {% endupdate %}

{% update date="2019-09-01" %}

## Version 7.3.4

**Updates**:

* Removed legacy dead code - “dispatchTouchEvent” is no longer present in the SDK

**Fixed**:

* Possible issue causing certain display ads not to load
* A situation where the OS might null point the SDK with invalid Location object
* Issue in the MoPub Adapter where a non-existent method was referenced
  {% endupdate %}

{% update date="2019-08-01" %}

## Version 7.3.3

**Updates**:

* Support for Smartlink+: A deep linking scheme allowing advertisers to provide a fallback URL, if the destination of the deep link cannot be found on the device. This scheme also allows the attachment of appropriate click trackers to both the primary URL and the fallback URL.
* Support for native browser scheme: A new option for advertisers to notify the Fyber SDK that the click URL should be opened in the native browser of the device and not in the built-in browser of the SDK. This is an additional option to the current method of using a URL suffix.
* *New* Mopub custom event adapters, distributed via maven. *please note - adapter class names have changed.*

**Fixed**:

* Issue where in some rare cases user agent extraction might have caused an ANR
* Issues related to VPAID - improved back button support and which enables proper end card delay.
* Improved VAST parsing
* Issue where banners would refresh every time visibility changed, regardless of refresh counters.
* Time Accuracy (TACC) is now sent correctly.
* Miscellaneous bug fixes and improvements
  {% endupdate %}

{% update date="2019-07-01" %}

## Version 7.3.2

**Updates**

* New GDPR Consent String API

**Fixed**

* Various stability and performance issues
  {% endupdate %}

{% update date="2019-05-01" %}

## Version 7.3.1

**Fixed**

* Various stability and performance issues
  {% endupdate %}

{% update date="2019-05-01" %}

## Version 7.3.0

**Updates**

Deeplinks

* Support for Intent

Video (VAST) End-Card Experience and Design

* The default end-card now has new design and experience
* The "Replay" button has been removed from the Fyber Marketplace default end-card
* The new “Download” button for Fyber Marketplace end-cards, when clicking an action, has a downloadable link for Google Play Store (instead of a "Visit Us" button)
* End-card phones’ notch support

Video (VAST) End-Card Optimizations

* Displaying end-card when video is stuck and cannot be completed
* End-card selection optimization
* Always show end-card after ad skip
* Display Fyber default end-card if there is no ad end-card

Playable Ads

* Playable ads certification on SDK

Developer Experience

* It is now possible to use the "ads-identifier" library rather than including the admob dependency

VPAID

* Rewarded ad would not be skippable using the Android "Back" button

Mediating the SDK

* Adapter update for AdMob 17.1

**Fixed**

* MRaid bridge fixes - orientation, generic communication
* WebView crash fixed
* Crash fix for NullPointerException on checkCallingOrSelfPermission()

**Deprecated**

* "onPlayerError" callback
* Fyber Marketplace’s Native Ad Kit (ia-native-kit)
  {% endupdate %}

{% update date="2019-04-01" %}

## Version 7.2.2

**Updates**

* MoPub adapter update for MoPub SDK v5.4.1 and above.
  {% endupdate %}

{% update date="2019-01-01" %}

## Version 7.2.1

**Updates**

**New&#x20;*****Use Secure Connections*****&#x20;API**

Today, publishers may set their app connections to be secured. With SDK v7.2.1, publishers can now set their SDK connections be secured separately from their app connection secure level with a new SDK API:

{% code title="Java" %}

```java
useSecureConnections (boolean isSecured)
```

{% endcode %}

The default value is false.

Once *isSecured* is set to *true*, Display or VAST ads will have secured connections. If ad’s Display HTML or VAST were not set to be secured successfully, the SDK will drop the ad (black screen for HTML ads and a VAST error for VAST ads). Error callback:

{% code title="Java" %}

```java
onInneractiveFailedAdRequest (adspot,”Non secure content detected”)
```

{% endcode %}

**Breaking changes**

New interface method `onAdEnteredErrorState` has been added to the `*AdEventsListener` interfaces. Currently, This method will be invoked once MRAID VIDEO Display ads have entered an error state (for example - when an MRAID video has not started playing after a short while).

In such cases, The SDK Will take care of presenting the user with a close button over the ad and this callback will be called.

**Fixed**

* Potential crash was resolved.
  {% endupdate %}

{% update date="2019-01-01" %}

## Version 7.2.0

**Updates**

* Support MRAID end-cards for video Interstitial ad
* Support uniform Skippability: For video interstitials, any video that is 15s or shorter will be non-skippable. Videos 16s or longer will be skippable usually after 5s (or otherwise set by the publisher)
* Extended support for MRAID video in Interstitial Display ad

**Fixed**

* NPE (NullPointerException) for long press on webView was resolved
* Improved video rendering (VAST) : resolved several important bugs including cases where video playback is interrupted soon after it begins
* Addressed an additional ad auto-redirect scenario that uses mraid.open()
  {% endupdate %}

{% update date="2018-09-01" %}

## Version 7.1.7

**Updates**

* Secured ad requests when disabling cleartext traffic
* Ads now respect CUTOUT settings for android P

**Fixed**

* Endcard disappearing upon coming back to app
  {% endupdate %}

{% update date="2018-07-01" %}

## Version 7.1.6

**Fixed**

* Crash resulted in two subsequent calls to show an ad
  {% endupdate %}

{% update date="2018-05-01" %}

## Version 7.1.5

**Updates**

* GDPR Consent API
  {% endupdate %}

{% update date="2018-05-01" %}

## Version 7.1.4

**Updates**

* Fixed bug on AdMob adapter
* Fixed various stability and performance issues
  {% endupdate %}

{% update date="2026-07-04" %}

## Version 7.1.3

**Updates**

* Added support for viewability measurement from VPAID
* Updated minimum supported Android API version to 15 (ICS)
* Improved stability and performance of VPAID
* Support VAST 3.0 "closeLinear" event
* Bug fixes
  {% endupdate %}

{% update date="2017-11-01" %}

## Version 7.1.1

**Fixed**

* Added support for using a legacy SDK (v6) and VAMP SDK (v7) on the same application (The package name for the SDK have changed to com.fyber.inneractive.sdk)
* Supply an API to dismiss an Interstitial by the Publisher
* Fixed VPaid bugs
* Fixed various stability and performance issues
  {% endupdate %}

{% update date="2017-11-01" %}

## Version 7.1.0

**Updates**

* Added support for using legacy SDK (v6) and SDK v7 in the same application (The package name for the SDK have changed to com.fyber.inneractive.sdk)
* Added new API for closing an Interstitial Ad

**Fixed**

* Performance and stability
  {% endupdate %}
  {% endupdates %}


# Integrating the iOS SDK

This guide describes how to integrate the DT Exchange SDK into your iOS project, which uses CocoaPods for dependency management.

## Integrating with CocoaPods <a href="#h_01ezxyfqpvdb5hyxvpvpcyenz4" id="h_01ezxyfqpvdb5hyxvpvpcyenz4"></a>

CocoaPods enables you to add and manage external libraries. To integrate via CocoaPods:

1. Open a terminal and navigate to your project directory.
2. Run the following command to create a new `Podfile` if you don't already have one:

{% code title="Bash" %}

```bash
pod init
```

{% endcode %}

3. Edit the `Podfile` and add the DT Exchange pod to the desired target:

{% code title="Bash" %}

```bash
pod 'Fyber_Marketplace_SDK'
```

{% endcode %}

4. To install and update the repository, run the following command. The `pod install` command installs the SDK and its dependencies and creates a new `.xcworkspace` file for use with Xcode:

{% code title="Bash" %}

```bash
pod install --repo-update
```

{% endcode %}

5. To import the `IASDKCore` into the `AppDelegate` class, run the following command:

{% code title="Objective-C" %}

```objective-c
[IASDKCore.sharedInstance setGDPRConsentString:@"abcdef"];
```

{% endcode %}

## Integrating with Swift Package Manager

The DT Exchange iOS SDK can be integrated using Swift Package Manager as an alternative to CocoaPods. The SPM package delivers the same `IASDKCore` module, so no source code changes are required.

1. In Xcode, open your project and go to **File → Add Package Dependencies…**
2. In the **Search/URL** field, paste the DT Exchange package URL:

```
https://github.com/inner-active/DTExchangeSDK-iOS-SPM
```

3. Set the **Dependency Rule** to **Up to Next Major Version** starting from the version you want to integrate (for example `8.4.9`), and click **Add Package**.
4. When prompted, select the **DTExchangeSDK** library product, add it to your app target, and click **Add Package**.
5. Select your app target and go to **Build Settings**. For **Other Linker Flags** (`OTHER_LDFLAGS`), add the `-ObjC` linker flag.

{% hint style="warning" %}
This flag is required for every project, Swift and Objective-C alike. The SDK is a static binary framework containing Objective-C categories. Without `-ObjC`, the linker strips them and the app crashes at launch.
{% endhint %}

6. Import the SDK.

{% tabs %}
{% tab title="Swift" %}

```swift
import IASDKCore
```

{% endtab %}

{% tab title="Objective-C" %}

```objective-c
#import <IASDKCore/IASDKCore.h>
```

{% endtab %}
{% endtabs %}

## Downloading and Setting Up the SDK <a href="#h_01h959gwaf4djxmqnn393p4knq" id="h_01h959gwaf4djxmqnn393p4knq"></a>

To download the DT Exchange iOS SDK, click here:

<a href="https://cdn2.inner-active.mobi/fmp-sdk/files/DTExchangeSDK-iOS-v8.4.10.zip" class="button secondary" data-icon="arrow-down">DT Exchange iOS SDK 8.4.10</a>

{% hint style="success" %}
The DT Exchange SDK zip folder includes a test app that demonstrates the integration process and adds functionality. It shows ads from DT Exchange and troubleshoots issues.
{% endhint %}

### Starting the Process <a href="#h_01j6pq220brx4v9rqv1yg0kdzn" id="h_01j6pq220brx4v9rqv1yg0kdzn"></a>

* The DT iOS SDK requires a minimum deployment target of iOS 15.
* If you use a dependency manager, see the following sections and then refer to [Step 2: Initializing the SDK](#h_01h959gwafm6r8zapzj5khd113).
  * For CocoaPods Dependency Manager, see [Integrating with CocoaPods](#h_01ezxyfqpvdb5hyxvpvpcyenz4).
  * For Swift Package Manager, see [Integrating with Swift Package Manager](#integrating-with-swift-package-manager).

## Step 1: Integrating the Libraries <a href="#h_01h959gwafx2axgb4wwt1nxt6w" id="h_01h959gwafx2axgb4wwt1nxt6w"></a>

1. Drag the `IASDKCore` library to your Xcode project.\
   The **Choose options for adding these files** pop-up screen appears.
2. Select the **Copy items if needed** and **Create Groups** checkboxes.
3. From **Application target**→**Build Phases,** click **Link Binary With Libraries** to verify that the app target is linked with the `IASDKCore` library.
4. If missing, drag the `IASDKCore` library to the **Link Binary With Libraries** section. This links your project with the `IASDKCore` library and adds a required path to the **Framework Search Paths**.
5. Import the `IASDKCore` into the `AppDelegate` class:

{% code title="Objective-C" %}

```objective-c
#import <IASDKCore/IASDKCore.h>
```

{% endcode %}

## Step 2: Initializing the SDK <a href="#h_01h959gwafm6r8zapzj5khd113" id="h_01h959gwafm6r8zapzj5khd113"></a>

SDK initialization is mandatory because the DT SDK relies on the [console](https://docs.digitalturbine.com/dt-console/) configuration for functionality. Without it, the SDK won't operate, and no ads will display. DT recommends performing this step during the app's initialization.

The following takes place during the initialization phase:

* Initialization of SDK.
* Remote configuration fetching, parsing, loading, and local configuration update.

1. Add the following code inside the method in the `AppDelegate` class.

{% code title="Objective-C" %}

```objective-c
application:didFinishLaunchingWithOptions:
```

{% endcode %}

2. Run the following command:

{% code title="Objective-C" %}

```objective-c
[IASDKCore.sharedInstance initWithAppID:@"YOUR APP ID"
                        completionBlock:^(BOOL success, NSError * _Nullable error) {}
                        completionQueue:nil];
```

{% endcode %}

{% hint style="success" %}
All Publisher (client-side) Ad Requests are on hold until the configuration is loaded to memory. The requests resume asynchronously once the config is ready. If a timeout occurs, the Publisher receives an `ad failed` event.
{% endhint %}

{% hint style="success" %}
For further information about advanced SDK init integration, see [SDK Initialization for DT Exchange SDK](/dt-exchange/sdk-configuration/integrating-the-ios-sdk/sdk-initialization-for-dt-exchange-sdk).
{% endhint %}

## Step 3: Configuring Apple Requirements <a href="#h_01h959gwafmpkhzway054zxn28" id="h_01h959gwafmpkhzway054zxn28"></a>

Adhering to Apple's requirements ensures that your app complies with its privacy guidelines, as described in [ATS Configuration for DT Exchange SDK](/dt-exchange/sdk-configuration/integrating-the-ios-sdk/ats-configuration-for-dt-exchange-sdk).

### Configuring Tracking Permission Alerts with ATT Framework <a href="#step-4-optionally-configure-tracking-permission-alert-using-att-framework-for-ios-14" id="step-4-optionally-configure-tracking-permission-alert-using-att-framework-for-ios-14"></a>

App Tracking Transparency (ATT) allows you to request user consent for tracking. You must use the ATT framework and provide your users with an authorization request within your app only if you want to receive consent and access a non-zero IDFA from the device. For more information, see [App Tracking Transparency](https://developer.apple.com/documentation/apptrackingtransparency).

{% hint style="info" %}
Calling `requestTrackingAuthorization(completionHandler:)` prompts the end user for app-tracking authorization. If the user disables tracking, the IDFA is set to zero.
{% endhint %}

#### SKAdNetwork Attribution Solution <a href="#skadnetwork-attribution-solution" id="skadnetwork-attribution-solution"></a>

The [SKAdNetwork API](https://developer.apple.com/documentation/storekit/skadnetwork) enables advertisers to measure app installs in a privacy-aware manner. Configuring SKAdNetwork IDs is crucial to monetizing with DT Exchange since it allows DSPs to credit your app with installs. DT recommends that you include SKAdNetwork IDs in the `info.plist` file to maximize revenue potential.

### Getting the SKAdNetwork IDs <a href="#id-01hry22k18ewb6ypwm7f5hhhnn" id="id-01hry22k18ewb6ypwm7f5hhhnn"></a>

The SKAdNetwork IDs for DT and DT buyers are available in two regularly updated formats. Select one of the following links to retrieve the latest SKAdNetwork IDs:

* SKAdNetwork IDs in [JSON format](https://github.com/fyber-engineering/SKAdNetworks/blob/master/docs/index.json).
* SKAdNetwork IDs in [XML format](https://github.com/fyber-engineering/SKAdNetworks/blob/master/docs/skadnetwork.xml).

### Configuring the SKAdNetwork IDs <a href="#id-01hry2ffm7789xepyy78tr8pn0" id="id-01hry2ffm7789xepyy78tr8pn0"></a>

The SKAdNetwork helps track app installs in a privacy-friendly way. To configure your app with SKAdNetwork IDs:

1. Select `Info.plist` from the **Project** navigator in Xcode.
2. In the property list editor, click **Add** (+) beside a key and press **Return**.
3. In the field, type the key name: [`SKAdNetworkItems`](https://developer.apple.com/documentation/bundleresources/information_property_list/skadnetworkitems).
4. From the pop-up menu in the **Type** column, select **Array**.
5. Create an array that contains one dictionary for each of DT's recommended SKAdNetwork IDs with the single-key: [`SKAd Network Identifier`](https://developer.apple.com/documentation/bundleresources/information_property_list/skadnetworkitems/skadnetworkidentifier). The string value for the key is the ad network identifier.

### SKAdNetwork ID Manager <a href="#h_01h959gwagcg5vdny4rdd1c74h" id="h_01h959gwagcg5vdny4rdd1c74h"></a>

The [SKAdNetwork IDs Manager](/dt-fairbid/fairbid-sdk/sdk-reference/skadnetwork-id-auto-updater) tool identifies and manages SKAdNetwork IDs. This tool processes and deduplicates SKAdNetwork IDs for all buyers on DT Exchange and then generates a finalized `Info.plist`output for streamlining integration into your app. The tool enables you to add other SKAdNetwork IDs to your final `Info.plist` file.

{% hint style="success" %}
DT recommends that you use lowercase text for the ad network identifier string.
{% endhint %}

To configure SKAdNetwork IDs, see [Configuring a Source App](https://developer.apple.com/documentation/storekit/skadnetwork/configuring_a_source_app).

## Step 4: Adding Delegates <a href="#h_01h959gwag34mr00anjymw58a1" id="h_01h959gwag34mr00anjymw58a1"></a>

Delegates manage various events and interactions related to ads. Depending on your integration, you may need to add the following delegates to your iOS integration:

* Global Ad Delegate Protocol
* Unit Delegate
* Video Content Delegate
* HTML / MRAID Delegate

For further information, see [Delegate Protocols](/dt-exchange/sdk-configuration/integrating-the-ios-sdk/delegate-protocols).

## Step 5: Adding User Consent <a href="#h_01h959gwage1xq9vgmme2pfpdr" id="h_01h959gwage1xq9vgmme2pfpdr"></a>

User consent mechanisms comply with various data protection laws. The following regulations mandate that users' data be handled with explicit consent:

* [GDPR](#h_01j64gft6cdgx97eyg11t7dfyf)
* [CCPA](#h_01h959gwagcd68btfgwz2jk435)
* [LGPD](#h_01h959gwag1eznq5crhrytafnw)
* [COPPA](#h_01h959gwah3pc301ncg03zsfqf)
* [GPP](#gpp)

### GDPR <a href="#h_01j64gft6cdgx97eyg11t7dfyf" id="h_01j64gft6cdgx97eyg11t7dfyf"></a>

The General Data Protection Regulation ([GDPR](https://gdpr.eu/)) of the European Union requires you to implement a user consent mechanism. A user could be within the GDPR scope for your app when one or all of the following apply:

* The user is currently located in the EU.
* The user has registered with the app as an EU resident.
* The app is specifically targeted to EU users.

To comply with EU regulations and ensure seamless ad monetization, DT recommends consulting a legal advisor to determine the best approach for your business and using a Consent Management Platform (CMP).

If you haven’t updated to SDK 8.3.1 or later, you need to manually configure consent values with your CMP. The SDK automatically retrieves these values from 8.3.1 and later, eliminating the need for manual setup. For a complete list of CMPs, see the [Interactive Advertising Bureau - CMP List](https://iabeurope.eu/cmp-list/).

To incorporate GDPR consent values, run the `GDPRConsent` API in Boolean format, for example:

{% code title="Objective-C" %}

```objective-c
[IASDKCore.sharedInstance setGDPRConsent:YES]
```

{% endcode %}

Valid values:

* `True`: The user grants consent.
* `False`: The user does not grant consent.

#### Setting Consent String

{% hint style="warning" %}
The user's consent status must be passed to the SDK before the SDK is initialized.\
When you set a GDPR consent value for a user, DT assumes that the user is subject to GDPR rules, even if the user is outside Europe. If a user updates their consent later, you only need to call the API again with the new value.
{% endhint %}

To set the GDPR consent string, use the following API:

{% code title="Objective-C" %}

```objective-c
[IASDKCore.sharedInstance setGDPRConsentString:@"abcdef"];
```

{% endcode %}

### CCPA <a href="#h_01h959gwagcd68btfgwz2jk435" id="h_01h959gwagcd68btfgwz2jk435"></a>

The California Consumer Privacy Act of 2018 ([CCPA](https://iabtechlab.com/standards/ccpa/)) protects the personal information of California residents and applies to all companies operating in California. If a California resident uses a mobile app developer's app, CCPA applies to the developer and every company that processes the personal information of the app's users.\
For more information on CCPA, see [IAB CCPA Compliance Framework](https://www.iab.com/guidelines/ccpa-framework/).

To set the CCPA consent string, use the following API:

{% code title="Objective-C" %}

```objective-c
IASDKCore.sharedInstance.CCPAString = @"1YNN";
```

{% endcode %}

DT supports the following values for the US Privacy String:

* `1---`: CCPA does not apply, for example, the user is not a California resident.
* `1YNN`: User does NOT opt out, ad experience continues.
* `1YYN`: User opts out of targeted advertising.

For more information, see [US Privacy IAB documentation](https://github.com/InteractiveAdvertisingBureau/USPrivacy/blob/master/CCPA/US%20Privacy%20String.md).

To clear the CCPA-provided data, pass a `nil` value and use the following Clear Privacy Setting:

{% code title="Objective-C" %}

```objective-c
IASDKCore.sharedInstance.CCPAString = nil;
```

{% endcode %}

{% hint style="success" %}
The DT Exchange SDK does not validate the provided CCPA string and passes it as-is.
{% endhint %}

### LGPD <a href="#h_01h959gwag1eznq5crhrytafnw" id="h_01h959gwag1eznq5crhrytafnw"></a>

The Brazilian General Data Protection Law, the Lei Geral de Proteção de Dados Pessoais ([LGPD](https://lgpd-brazil.info/)), mandates processing personal data for legitimate, specific, explicit, and communicated purposes.

To set the LGPD consent value, use the following API:

{% tabs %}
{% tab title="Swift" %}

```swift
IASDKCore.sharedInstance().lgpdConsent = .given
IASDKCore.sharedInstance().lgpdConsent = .denied
```

{% endtab %}

{% tab title="Objective-C" %}

```objective-c
[[IASDKCore sharedInstance] setLGPDConsent:IALGPDConsentTypeGiven];
[[IASDKCore sharedInstance] setLGPDConsent:IALGPDConsentTypeDenied];
```

{% endtab %}
{% endtabs %}

Valid values:

* `IALGPDConsentTypeGiven`: User grants consent.
* `IALGPDConsentTypeDenied`: User does not grant consent.

If the consent value is not set, the default is `no consent`.

To clear the consent flag and consent data, use the following API:

{% tabs %}
{% tab title="Swift" %}
{% code title="" %}

```swift
IASDKCore.sharedInstance().clearLGPDConsentData()
```

{% endcode %}
{% endtab %}

{% tab title="Objective-C" %}
{% code title="" %}

```objective-c
[[IASDKCore sharedInstance] clearLGPDConsentData];
```

{% endcode %}
{% endtab %}
{% endtabs %}

### COPPA <a href="#h_01h959gwah3pc301ncg03zsfqf" id="h_01h959gwah3pc301ncg03zsfqf"></a>

The Children's Online Privacy Protection Act of 1998 ([COPPA](https://www.ftc.gov/legal-library/browse/rules/childrens-online-privacy-protection-rule-coppa)) is a federal law that imposes specific requirements on websites and online service operators to protect the privacy of children under 13.

#### COPPA API for Flagging Specific Users <a href="#h_01h959gwah2bbwk5ampns6hq97" id="h_01h959gwah2bbwk5ampns6hq97"></a>

iOS SDK 8.2.1+ supports the COPPA API, which allows publishers to flag specific end users as children as required under COPPA. It is the Publisher's responsibility to decide whether to use the COPPA API or to treat all users as children. For instructions on flagging all users as children, see [COPPA](/dt-exchange/getting-started-with-dt-exchange/privacy/coppa).

{% hint style="warning" %}

* Execute the COPPA API after successfully initializing the DT SDK.
* Pass the COPPA state after every successful init of the SDK.
  {% endhint %}

To confirm that the target audience of the application applies to COPPA, use the following API:

{% tabs %}
{% tab title="Swift" %}

```swift
IASDKCore.sharedInstance().coppaApplies = .given
```

{% endtab %}

{% tab title="Objective-C" %}

```objective-c
[IASDKCore.sharedInstance.coppaApplies = IACoppaAppliesTypeGiven];
```

{% endtab %}
{% endtabs %}

### GPP

The IAB Global Privacy Protocol ([GPP](https://globalprivacyplatform.com/)) is a standardized framework for managing and transmitting user consent and privacy signals across the digital advertising ecosystem.

GPP is supported starting with iOS SDK 8.4.6. For more information, see [GPP](/dt-exchange/getting-started-with-dt-exchange/privacy/gpp).

## Step 6: (Optional) Setting User IDs <a href="#h_01h959gwahdy2fnpk60ktzvd80" id="h_01h959gwahdy2fnpk60ktzvd80"></a>

This section describes how to set a User ID that is cached on the device and does not need to be passed in every session.

### Setting a User ID <a href="#h_01j6pv3nh4h4427d01gm17bmhm" id="h_01j6pv3nh4h4427d01gm17bmhm"></a>

The User ID is sent as is, without validation or modification.\
To reset the User ID on a device, pass a `nil` or an empty string in the following format.

{% code title="Objective-C" %}

```objective-c
@property (atomic, nullable) NSString *userID;
// Example:
IASDKCore.sharedInstance.userID = @"User_123456"
```

{% endcode %}

### Setting Introspection (reflection) Integration <a href="#h_01j6pv5hky08sy1j7bgzx274tx" id="h_01j6pv5hky08sy1j7bgzx274tx"></a>

To run an integration using introspection (reflection), run the following script:

{% code title="Objective-C" %}

```objective-c
Class IASDKCore        = NSClassFromString(@"IASDKCore");
SEL sharedInstanceSel  = NSSelectorFromString(@"sharedInstance");
SEL setUserID          = NSSelectorFromString(@"setUserID:");
id sharedInstance      = [IASDKCore performSelector:sharedInstanceSel];
[sharedInstance performSelector:setUserID withObject:@"User_123456"];
```

{% endcode %}

## Step 7: Adding the Vendor List

Add the vendor IDs from DT's approved vendor list to your CMP, ensuring they appear in the `disclosedVendors` segment of your TC string.

IAB Europe's Transparency and Consent Framework (TCF) 2.3 is a standardized framework that mandates you disclose your vendors to your users.

For more information and the up-to-date list of vendors, see [TCF 2.3](/dt-exchange/getting-started-with-dt-exchange/privacy/tcf-2.3).


# SDK Initialization for DT Exchange SDK

This guide explains how to configure advanced settings and initialize the DT Exchange SDK in your iOS application to ensure ad delivery and access to all SDK features.

## API init Method <a href="#h_01je0vtp3vhykqmetknnen37wf" id="h_01je0vtp3vhykqmetknnen37wf"></a>

To initialize the SDK, use the `initWithAppID:` method with your `AppID`.

{% code title="Objective-C" %}

```objective-c
 IASDKCore
  - (void)initWithAppID:(NSString * _Nonnull)appID
      completionBlock:(IASDKCoreInitBlock _Nullable)completionBlock
      completionQueue:(dispatch_queue_t _Nullable)completionQueue;
```

{% endcode %}

The following table describes the parameters for the `initWithAppID:` method.

| PARAMETER         | PARAMETER TYPE                                                    | DESCRIPTION                                                                                                                                                          |
| ----------------- | ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `initWithAppID`   | <p><code>NSString \*</code><br><code>\_Nonnull</code></p>         | A mandatory parameter that defines the application ID in the DT Console.                                                                                             |
| `completionBlock` | <p><code>IASDKCoreInitBlock</code><br><code>\_Nullable</code></p> | An optional block that executes when SDK initialization is complete. It provides a `BOOL` success flag and an optional `NSError` object if the initialization fails. |
| `completionQueue` | <p><code>dispatch\_queue\_t</code><br><code>\_Nullable</code></p> | An optional queue specifying where the `completionBlock` invokes.                                                                                                    |

### API init Flag <a href="#h_01je0vtp3v4208jpy95n58jdzm" id="h_01je0vtp3v4208jpy95n58jdzm"></a>

You can verify the SDK initialization status using the `initialised` property:

{% code title="Objective-C" %}

```objective-c
  IASDKCore
  @property (atomic, readonly, getter=isInitialised) BOOL initialised;
```

{% endcode %}

This property returns `YES` if the SDK initialization is successful.

### Callback Completion Error Codes <a href="#h_01je0vtp3v4r13mm1zperj723w" id="h_01je0vtp3v4r13mm1zperj723w"></a>

If an error occurs, `NSSError` returns one of the following error codes.

{% code title="Objective-C" %}

```objective-c
    IASDKCore
    typedef NS_ENUM(NSInteger, IASDKCoreInitErrorType) {
    IASDKCoreInitErrorTypeUnknown = 0,
    IASDKCoreInitErrorTypeFailedToDownloadMandatoryData = 1,
    IASDKCoreInitErrorTypeInvalidAppID = 3,
    IASDKCoreInitErrorTypeCancelled = 4
};
```

{% endcode %}

The following table describes the Callback Completion Error Codes.

| ERROR CODE                                            | DESCRIPTION                                           |
| ----------------------------------------------------- | ----------------------------------------------------- |
| `IASDKCoreInitErrorTypeUnknown`                       | An unknown error occurred.                            |
| `IASDKCoreInitErrorTypeFailedToDownloadMandatoryData` | Mandatory data download failed.                       |
| `ASDKCoreInitErrorTypeInvalidAppID`                   | The provided `AppID` is invalid.                      |
| `IASDKCoreInitErrorTypeCancelled`                     | The initialization process was canceled or restarted. |


# ATS Configuration for DT Exchange SDK

App Transport Security (ATS) Settings is an Apple security feature that enforces HTTPS connections for encrypted and secure data transmission. However, many advertising networks and partners still rely on HTTP connections to optimize performance and maximize revenue. For this reason, Digital Turbine recommends enabling HTTP for your app.

In Xcode, this is defined by **Allow Arbitrary Downloads** property, which you can set either from the property list editor or by directly editing the content of the `Info.plist` file.

### Enabling HTTP Connections from Property List Editor <a href="#h_01jfpzfs4swhd6djrex2exbz2w" id="h_01jfpzfs4swhd6djrex2exbz2w"></a>

In Xcode property list editor, make sure that **Allow Arbitrary Downloads** property under **App Transport Security Settings** is set to `YES`. If necessary, see instructions at [Xcode Help on editing property lists](https://help.apple.com/xcode/mac/current/#/dev3f399a2a6).

<div align="left" data-with-frame="true"><img src="/files/H6NPmE5zfkHwKF3nhkPP" alt=""></div>

### Enabling HTTP Connections by Editing the `Info.plist` File <a href="#id-01jfpznsh10jsw0jxebk83f8vz" id="id-01jfpznsh10jsw0jxebk83f8vz"></a>

{% hint style="info" %}
In the `Info.plist` file, the **Allow Arbitrary Downloads** property is represented by `NSAllowsArbitraryLoads` key. For more information, see [Apple developer documentation on NSAllowsArbitraryLoads key](https://developer.apple.com/documentation/bundleresources/information-property-list/nsapptransportsecurity/nsallowsarbitraryloads).
{% endhint %}

To enable HTTP connections, copy and paste the following code snippet in the `Info.plist` file of your Xcode project:

{% code title="XML" %}

```xml
<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
   <true/>
</dict>
```

{% endcode %}


# iOS Ad Formats


# Banner/MREC Ads

To integrate Banner/MREC ads, ensure you have integrated the [IASDKCore Libraries](/dt-exchange/sdk-configuration/integrating-the-ios-sdk#h_01h959gwafx2axgb4wwt1nxt6w). Configure the ad placement and its controllers, create an Ad Request, and then fetch and display the ad.

## Importing the SDK <a href="#id-01h8e3fqsmwn10s7y43akm1pdm" id="id-01h8e3fqsmwn10s7y43akm1pdm"></a>

Import the following `IASDKCore` module into your desired view controller:

{% code title="Objective-C" %}

```objective-c
#import <IASDKCore/IASDKCore>.h
```

{% endcode %}

## Adding Properties <a href="#id-01h8e3fqsnp2bazspsrf4n0047" id="id-01h8e3fqsnp2bazspsrf4n0047"></a>

Retain each `IASDK` module on the client side, and declare properties, for example:

{% code title="Objective-C" %}

```objective-c
@property (nonatomic, strong) IAAdSpot *adSpot;
@property (nonatomic, strong) IAViewUnitController*viewUnitController;
@property (nonatomic, strong) IAMRAIDContentController*mraidContentController;
```

{% endcode %}

Optionally, create the `IAUserData` object for better ad targeting:

{% code title="Objective-C" %}

```objective-c
IAUserData *userData =
[IAUserData build:^(id  _Nonnull builder) { 
    builder.age = 34;     
    builder.gender = IAUserGenderTypeMale;    
    builder.zipCode = @"90210";
}];
IASDKCore.sharedInstance.userData = userData;
```

{% endcode %}

{% hint style="info" %}
The `build:` method is synchronous and runs on the same thread that it is invoked from, similar to iOS's `enumerateObjectsUsingBlock`. As a result, memory management like `weak` references are not needed inside the block.
{% endhint %}

Set global variables for SDK bidding provided in `IASDKCore` shared instance:

* `userData`
* `muteAudio`
* `mediationType`
* `debugger`

#### Example:

{% code title="Objective-C" %}

```objective-c
IASDKCore.sharedInstance.userData = userData;
IASDKCore.sharedInstance.muteAudio = YES;
IASDKCore.sharedInstance.mediationType = IAMediationMax.new;
IASDKCore.sharedInstance.debugger = [IADebugger build:^(id  _Nonnull builder) {
        builder.server = @"wv.inner-active";
        builder.mockResponsePath = @"bannerresponseforci";
        builder.database = @"4321";
    }];
```

{% endcode %}

## Creating the Ad Request Object <a href="#id-01h89m2e9jyr2t7srjqetzchqy" id="id-01h89m2e9jyr2t7srjqetzchqy"></a>

{% hint style="info" %}
This step is not mandatory for SDK Bidding mediation.
{% endhint %}

Initialize an `IAAdRequest` and provide the `spotID` and a `timeout` value:

{% code title="Objective-C" %}

```objective-c
IAAdRequest *adRequest =
[IAAdRequest build:^(id  _Nonnull builder) { 
    builder.spotID = @"YOUR SPOT ID";    
    builder.timeout = 10; 
}];
```

{% endcode %}

## Initializing the MRAID Content Controller <a href="#id-01h8e3vmc7tps9j55yfk8ta180" id="id-01h8e3vmc7tps9j55yfk8ta180"></a>

Initialize the `IAMRAIDContentController`:

{% code title="Objective-C" %}

```objective-c
IAMRAIDContentController *mraidContentController =
[IAMRAIDContentController build: ^(id<IAMRAIDContentControllerBuilderh>  _Nonnull builder) {
   builder.MRAIDContentDelegate = self; 
// A delegate should be passed in order to get video content related callbacks;
}];
self.mraidContentController = mraidContentController; 
// The MRAID Content ControllerPage should be retained by a client side;
```

{% endcode %}

## Declaring Your View Controller <a href="#id-01h89dgv9f5wd3z51wsggjyag7" id="id-01h89dgv9f5wd3z51wsggjyag7"></a>

Declare that your view controller conforms to the `IAMRAIDContentDelegate` protocol:

{% code title="Objective-C" %}

```objective-c
@interface YourViewController () <IAMRAIDContentDelegate>
```

{% endcode %}

For more information, see [HTML/MRAID Delegate Protocols](/dt-exchange/sdk-configuration/integrating-the-ios-sdk/delegate-protocols#html-mraid).

## Initializing the View Unit Controller <a href="#id-01h8e4r05n1c0f9ae2zrreewfc" id="id-01h8e4r05n1c0f9ae2zrreewfc"></a>

Initialize the `IAViewUnitController`:

{% code title="Objective-C" %}

```objective-c
IAViewUnitController *viewUnitController = [IAViewUnitController
    build:^(id<IAViewUnitControllerBuilder> _Nonnull builder) {
      builder.unitDelegate = self;
      // all the required content controllers should be added to the desired
      // unit controller:
      [builder addSupportedContentController:self.mraidContentController];
    }];

self.viewUnitController = viewUnitController;
// the View Unit Controller should be retained by a client side;
```

{% endcode %}

## Declaring Your View Controller <a href="#id-01h8e4d3128zwwmex23d9p51t1" id="id-01h8e4d3128zwwmex23d9p51t1"></a>

Declare that your view controller conforms to the `IAUnitDelegate` protocol:

{% code title="Objective-C" %}

```objective-c
@interface YourViewController () <IAUnitDelegate, IAMRAIDContentDelegate>
```

{% endcode %}

For more information, see [Unit Content Delegate Protocols](/dt-exchange/sdk-configuration/integrating-the-ios-sdk/delegate-protocols#unit).

## Initializing the Placement <a href="#id-01h89dgv9fvtnan2petmwenpmq" id="id-01h89dgv9fvtnan2petmwenpmq"></a>

Initialize the `IAAdSpot` and pass your `adRequest` object:

{% code title="Objective-C" %}

```objective-c
IAAdSpot *adSpot = [IAAdSpot build:^(id<IAAdSpotBuilder>  _Nonnull builder) {
    builder.adRequest = adRequest; 
    // pass here the ad request object;    
    // all the supported (by a client side) unit controllers,
    // (in this case - view unit controller) should be added to the desired ad spot:     
    [builder addSupportedUnitController:self.viewUnitController];
}];

self.adSpot = adSpot; 
// the Ad Spot should be retained by a client side;
```

{% endcode %}

## Fetching the Ad <a href="#id-01h89dgv9fmy9zfr2v60evr0ch" id="id-01h89dgv9fmy9zfr2v60evr0ch"></a>

The way in which the ad is fetched depends on the mediation type — Waterfall or SDK Bidding.

### Fetching the Ad for Waterfall <a href="#h_01k7xyfzm4wa9xg8pcqw01qpax" id="h_01k7xyfzm4wa9xg8pcqw01qpax"></a>

In Waterfall mediation, use `fetchAdWithCompletion:` and `showAdInParentView:` to fetch the ad:

{% code title="Objective-C" %}

```objective-c
// declare a weak property, because of block:
__weak typeof(self) weakSelf = self;

[self.adSpot fetchAdWithCompletion:^(IAAdSpot* _Nullable adSpot,
                                     IAAdModel* _Nullable adModel,
                                     NSError* _Nullable error) {
  if (error) {
    NSLog(@"Failed to get an ad: %@\n", error);
  } else {
    if (adSpot.activeUnitController == weakSelf.viewUnitController) {
      [weakSelf.viewUnitController showAdInParentView:weakSelf.view];
    }
  }
}];
```

{% endcode %}

### Fetching the Ad for SDK Bidding <a href="#h_01k7xyfzm4stm36s03gexvjhx6" id="h_01k7xyfzm4stm36s03gexvjhx6"></a>

In SDK Bidding, DT Exchange must first generate a token for the Mediation SDK to use when sending the request to the server.

#### **Generating the Token**

The token can be generated upon SDK initialization.

{% code title="Objective-C" %}

```objective-c
NSString *biddingToken = FMPBiddingManager.sharedInstance.biddingToken;
```

{% endcode %}

Return type: `NSString *`

If an error occurs, the returned value is `nil`.

#### **Loading the Ad**

If DT Exchange wins the auction, load the ad with the `signaldata (adm)` that was received from the server:

{% code title="Objective-C" %}

```objective-c
[self.adSpot
    loadAdWithMarkup:adm
      withCompletion:^(IAAdSpot *_Nullable adSpot, IAAdModel *_Nullable adModel,
                       NSError *_Nullable error) {
        if (error) {
          NSLog(@"Failed to get an ad: %@\n", error);
        } else {
          // If is in-view ad unit response, show in view:
          if (adSpot.activeUnitController == weakSelf.viewUnitController) {
            [weakSelf.viewUnitController showAdInParentView:weakSelf.view];
          }
          // If is fullscreen ad unit response, show as fullscreen:
          else if (adSpot.activeUnitController == weakSelf.fsUnitController) {
            [weakSelf.fsUnitController showAdAnimated:YES completion:nil];
          }
        }
      }];
```

{% endcode %}

<br>


# Interstitial Ads

To integrate Interstitial ads, ensure you have integrated the [IASDKCore Libraries](/dt-exchange/sdk-configuration/integrating-the-ios-sdk#h_01h959gwafx2axgb4wwt1nxt6w). Configure the ad placement and its controllers, create an Ad Request, and then fetch and display the ad.

## Importing the SDK <a href="#id-01k5e4za1fjbra57dkvd5hgkn5" id="id-01k5e4za1fjbra57dkvd5hgkn5"></a>

Import the following `IASDKCore` module into your desired view controller:

{% code title="Objective-C" %}

```objective-c
#import <IASDKCore/IASDKCore.h>
```

{% endcode %}

## Adding Properties <a href="#h_01k5nq87hrbb4qmhbkzntm241m" id="h_01k5nq87hrbb4qmhbkzntm241m"></a>

Retain each `IASDK` module on the client side, and declare properties for:

* `adSpot` (placement)
* `UnitController`
* `videoContentController`
* `mraidConentController`

{% code title="Objective-C" %}

```objective-c
@property (nonatomic, strong) IAAdSpot *adSpot;
@property (nonatomic, strong) IAFullscreenUnitController *unitController;
@property (nonatomic, strong) IAVideoContentController *videoContentController;
@property (nonatomic, strong) IAMRAIDContentController *mraidContentController;
```

{% endcode %}

Optionally, create an `IAUserData` object for better ad targeting:

{% code title="Objective-C" %}

```objective-c
IAUserData *userData =
[IAUserData build:^(id  _Nonnull builder) { 
    builder.age = 34;     
    builder.gender = IAUserGenderTypeMale;    
    builder.zipCode = @"90210";
}];
IASDKCore.sharedInstance.userData = userData;
```

{% endcode %}

{% hint style="info" %}
The `build:` method is synchronous and runs on the same thread that it is invoked from, similar to iOS's `enumerateObjectsUsingBlock`. As a result, memory management like `weak` references are not needed inside the block.
{% endhint %}

Set global variables for SDK bidding provided in `IASDKCore` shared instance:

* `userData`
* `muteAudio`
* `mediationType`
* `debugger`

#### Example:

{% code title="Objective-C" %}

```objective-c
IASDKCore.sharedInstance.userData = userData;
IASDKCore.sharedInstance.muteAudio = YES;
IASDKCore.sharedInstance.mediationType = IAMediationMax.new;
IASDKCore.sharedInstance.debugger = [IADebugger build:^(id  _Nonnull builder) {
        builder.server = @"wv.inner-active";
        builder.mockResponsePath = @"bannerresponseforci";
        builder.database = @"4321";
    }];
  
```

{% endcode %}

## Creating the Ad Request Object <a href="#h_01k5nq8ey8db8ba8dgr9ndq3pj" id="h_01k5nq8ey8db8ba8dgr9ndq3pj"></a>

{% hint style="info" %}
This step is not mandatory for SDK Bidding mediation.
{% endhint %}

Initialize an `IAAdRequest` and provide the `spotID` and a `timeout` value:

{% code title="Objective-C" %}

```objective-c
AAdRequest *adRequest =
[IAAdRequest build:^(id  _Nonnull builder) { 
    builder.spotID = @"YOUR Interstitial_SPOT ID";    
    builder.timeout = 5;    
}];
```

{% endcode %}

Optionally, you can opt to mute non-rewarded interstitial ads by adding:

{% code title="Objective-C" %}

```objective-c
//You can also call the mute through the static object
//In both cases, the result is the same:
IASDKCore.sharedInstance().muteAudio = YES
```

{% endcode %}

## Initializing the Video Content Controller <a href="#h_01k5nq8kpw61g32a9dp8ys7swv" id="h_01k5nq8kpw61g32a9dp8ys7swv"></a>

Initialize the `videoContentController`:

{% code title="Objective-C" %}

```objective-c
IAVideoContentController *videoContentController =
    [IAVideoContentController build:
     ^(id  _Nonnull builder) {
        builder.videoContentDelegate = self; 
        // A delegate should be passed in order to get video content related callbacks;
}];
    
self.videoContentController = videoContentController; 
// The Video Content ControllerPage should be retained by a client side;
```

{% endcode %}

## Declaring Your View Controller <a href="#h_01k5nq914t8znmhznah6bjs7xv" id="h_01k5nq914t8znmhznah6bjs7xv"></a>

Declare your view controller conforms to the `IAVideoContentDelegate` protocol:

{% code title="Objective-C" %}

```objective-c
@interface YourViewController ()< IAVideoContentDelegate>
```

{% endcode %}

For more information, see [Video Content Delegate Protocols](/dt-exchange/sdk-configuration/integrating-the-ios-sdk/delegate-protocols#video-content).

## Initializing the MRAID Content Controller <a href="#h_01k5nqmgg6ez3s123kx9myrht5" id="h_01k5nqmgg6ez3s123kx9myrht5"></a>

Initialize the `IAMRAIDContentController`:

{% code title="Objective-C" %}

```objective-c
IAMRAIDContentController *mraidContentController =
    [IAMRAIDContentController build:
     ^(id  _Nonnull builder) {
        builder.MRAIDContentDelegate = self;
// a delegate should be passed in order to get video content related callbacks;
}];

self.mraidContentController = mraidContentController; 
// the MRAID Content ControllerPage should be retained by a client side;
```

{% endcode %}

## Declaring Your View Controller <a href="#h_01k5nqmpdenm8r6wbaws3fcbpt" id="h_01k5nqmpdenm8r6wbaws3fcbpt"></a>

Declare your view controller conforms to the `IAMRAIDContentDelegate` Protocol:

{% code title="Objective-C" %}

```objective-c
@interface YourViewController () <IAVideoContentDelegate, IAMRAIDContentDelegate>
```

{% endcode %}

For more information, see [HTML/MRAID Delegate Protocols](/dt-exchange/sdk-configuration/integrating-the-ios-sdk/delegate-protocols#html-mraid).

## Initializing the Full-Screen Unit Controller <a href="#h_01k5nqmvcvdqjc0209tfq6ermb" id="h_01k5nqmvcvdqjc0209tfq6ermb"></a>

Initialize the `IAFullscreenUnitController`:

{% code title="Objective-C" %}

```objective-c
IAFullscreenUnitController *fullscreenUnitController =
    [IAFullscreenUnitController build:^(id _Nonnull builder) {
      builder.unitDelegate = self;
      // all the needed content controllers should be added to the desired unit
      // controller:
      [builder addSupportedContentController:self.videoContentController];
      [builder addSupportedContentController:self.mraidContentController];
    }];

self.unitController = fullscreenUnitController;
// the Fullscreen Unit Controller should be retained by a client side;
```

{% endcode %}

## Declaring Your View Controller <a href="#h_01k5nqn0ma43mpxayt9axtate2" id="h_01k5nqn0ma43mpxayt9axtate2"></a>

Declare your view controller conforms to `IAUnitDelegate` Protocol:

{% code title="Objective-C" %}

```objective-c
@interface YourViewController () <IAVideoContentDelegate,
                                  IAMRAIDContentDelegate,
                                  IAUnitDelegate>
```

{% endcode %}

For more information, see [Unit Content Delegate Protocols](/dt-exchange/sdk-configuration/integrating-the-ios-sdk/delegate-protocols#unit).

## Initializing the Placement <a href="#h_01k5nqn6ny62swjegsdyyxa6fa" id="h_01k5nqn6ny62swjegsdyyxa6fa"></a>

Initialize the `IAAdSpot` (placement) and pass your `adRequest` object:

{% code title="Objective-C" %}

```objective-c
IAAdSpot *adSpot = [IAAdSpot build:^(id  _Nonnull builder) {
        builder.adRequest = adRequest; 
// pass here the ad request object;
        [builder addSupportedUnitController:self.unitController];
}];

self.adSpot = adSpot; 
// The Ad Spot should be retained by a client side;
```

{% endcode %}

## Fetching the Ad <a href="#h_01k5nqne3692v2washwr2sz0ws" id="h_01k5nqne3692v2washwr2sz0ws"></a>

The way in which the ad is fetched depends on the mediation type — Waterfall or SDK Bidding.

### Fetching the Ad for Waterfall <a href="#h_01k7y23wvdkbt0kr40nhdhahdg" id="h_01k7y23wvdkbt0kr40nhdhahdg"></a>

In Waterfall mediation, use `fetchAdWithCompletion:` and `showAdAnimated:` to fetch the ad:

{% code title="Objective-C" %}

```objective-c
// Declare a weak var, because of a retained block:
__weak typeof(self) weakSelf = self;
    
[self.adSpot fetchAdWithCompletion:^(IAAdSpot * _Nullable adSpot, IAAdModel * _Nullable adModel, NSError * _Nullable error) {
        if (!error) {
            [weakSelf.unitController showAdAnimated:YES completion:nil];
        }
}];
```

{% endcode %}

### Fetching the Ad for SDK Bidding <a href="#h_01k7y23wvd3maetdg0yjab35gn" id="h_01k7y23wvd3maetdg0yjab35gn"></a>

In SDK Bidding, DT Exchange must first generate a token for the Mediation SDK to use when sending the request to server.

#### **Generating the Token**

The token can be generated upon SDK initialization.

{% code title="Objective-C" %}

```objective-c
NSString *biddingToken = FMPBiddingManager.sharedInstance.biddingToken;
```

{% endcode %}

Return type: `NSString *`

If an error occurs, the returned value is `nil`.

#### **Loading the Ad**

If DT Exchange wins the auction, load the ad with the `signaldata (adm)` that was received from the server:

{% code title="Objective-C" %}

```objective-c
[self.adSpot
    loadAdWithMarkup:adm
      withCompletion:^(IAAdSpot *_Nullable adSpot, IAAdModel *_Nullable adModel,
                       NSError *_Nullable error) {
        if (error) {
          NSLog(@"Failed to get an ad: %@\n", error);
        } else {
          // If is in-view ad unit response, show in view:
          if (adSpot.activeUnitController == weakSelf.viewUnitController) {
            [weakSelf.viewUnitController showAdInParentView:weakSelf.view];
          }
          // If is fullscreen ad unit response, show as fullscreen:
          else if (adSpot.activeUnitController == weakSelf.fsUnitController) {
            [weakSelf.fsUnitController showAdAnimated:YES completion:nil];
          }
        }
      }];
```

{% endcode %}

<br>


# Rewarded Ads

To integrate Rewarded ads, ensure you have integrated the [IASDKCore Libraries](/dt-exchange/sdk-configuration/integrating-the-ios-sdk#h_01h959gwafx2axgb4wwt1nxt6w). Configure the ad placement and its controllers, create an Ad Request, and then fetch and display the ad.

## Importing the SDK <a href="#h_01k5nqvxah6gp8zgrba5ywaenz" id="h_01k5nqvxah6gp8zgrba5ywaenz"></a>

Import the following `IASDKCore` module into your desired view controller:

{% code title="Objective-C" %}

```objective-c
#import <IASDKCore/IASDKCore.h>
```

{% endcode %}

## Adding Properties <a href="#h_01k5nqvxahk3hdmzwxedx5c8dr" id="h_01k5nqvxahk3hdmzwxedx5c8dr"></a>

Retain each DT Exchange SDK entity, and declare properties for:

* `adSpot` (placement)
* `UnitController`
* `videoContentController`
* `mraidConentController`

{% code title="Objective-C" %}

```objective-c
@property (nonatomic, strong) IAAdSpot *adSpot;
@property (nonatomic, strong) IAFullscreenUnitController *unitController;
@property (nonatomic, strong) IAVideoContentController *videoContentController;
@property (nonatomic, strong) IAMRAIDContentController *mraidContentController;
```

{% endcode %}

Optionally, create an `IAUserData` object for better ad targeting:

{% code title="Objective-C" %}

```objective-c
IAUserData *userData = [IAUserData build:^(id  _Nonnull builder) 
{ 
    builder.age = 34;     
    builder.gender = IAUserGenderTypeMale;    
    builder.zipCode = @"90210";
}];
IASDKCore.sharedInstance.userData = userData;
```

{% endcode %}

{% hint style="info" %}
The `build:` method is synchronous and runs on the same thread that it is invoked from, similar to iOS's `enumerateObjectsUsingBlock`. As a result, special memory management like `weak` references are not needed inside the block.
{% endhint %}

Set global variables for SDK bidding provided in `IASDKCore` shared instance:

* `userData`
* `muteAudio`
* `mediationType`
* `debugger`

#### Example:

{% code title="Objective-C" %}

```objective-c
IASDKCore.sharedInstance.userData = userData;
IASDKCore.sharedInstance.muteAudio = YES;
IASDKCore.sharedInstance.mediationType = IAMediationMax.new;
IASDKCore.sharedInstance.debugger = [IADebugger build:^(id  _Nonnull builder) {
        builder.server = @"wv.inner-active";
        builder.mockResponsePath = @"bannerresponseforci";
        builder.database = @"4321";
    }];
```

{% endcode %}

## Creating the Ad Request Object <a href="#h_01k5nqp1p5b66wwqv1ddqbb51y" id="h_01k5nqp1p5b66wwqv1ddqbb51y"></a>

{% hint style="info" %}
This step is not mandatory for SDK Bidding mediation.
{% endhint %}

Initialize an `IAAdRequest` and provide the `spotID` and a `timeout` value:

{% code title="Objective-C" %}

```objective-c
IAAdRequest *adRequest = [IAAdRequest build:^(id  _Nonnull builder) 
{ 
    builder.spotID = @"YOUR SPOT ID";    
    builder.timeout = 5;    
}];
```

{% endcode %}

Optionally, you can opt to mute non-rewarded interstitial ads by adding:

{% code title="Objective-C" %}

```objective-c
//You can also call the mute through the static object
//In both cases, the result is the same:
IASDKCore.sharedInstance().muteAudio = YES
```

{% endcode %}

## Initializing the Video Content Controller <a href="#h_01k5nqvxahf79yfhrg3q67a6tw" id="h_01k5nqvxahf79yfhrg3q67a6tw"></a>

Initialize the `IAVideoContentController`:

{% code title="Objective-C" %}

```objective-c
IAVideoContentController *videoContentController =
    [IAVideoContentController build:^(id _Nonnull builder) {
      builder.videoContentDelegate = self;
      // A delegate should be passed in order to get video content related
      // callbacks;
    }];

self.videoContentController = videoContentController;
// The Video Content ControllerPage should be retained by a client side
```

{% endcode %}

## Declaring Your View Controller <a href="#h_01k5nqvxahr71kz09q0r8ewhqp" id="h_01k5nqvxahr71kz09q0r8ewhqp"></a>

Declare your view controller conforms to the `IAVideoContentDelegate` protocol:

{% code title="Objective-C" %}

```objective-c
@interface YourViewController  ()<IAVideoContentDelegate
```

{% endcode %}

For more information, see [Video Content Delegate Protocols](/dt-exchange/sdk-configuration/integrating-the-ios-sdk/delegate-protocols#video-content).

## Initializing the MRAID Content Controller <a href="#h_01k5nqvxah1ff3ge05vm34zn83" id="h_01k5nqvxah1ff3ge05vm34zn83"></a>

Initialize the `IAMRAIDContentController`:

{% code title="Objective-C" %}

```objective-c
IAMRAIDContentController *mraidContentController =
    [IAMRAIDContentController build:^(id _Nonnull builder) {
      builder.MRAIDContentDelegate = self;
      // A delegate should be passed in order to get video content related
      // callbacks;
    }];

self.mraidContentController = mraidContentController;
// The MRAID Content ControllerPage should be retained by a client side
```

{% endcode %}

Declare your view controller conforms to `IAMRAIDContentDelegate` protocol:

{% code title="Objective-C" %}

```
@interface YourViewController () <IAVideoContentDelegate, IAMRAIDContentDelegate> 
```

{% endcode %}

For more information, see [HTML/MRAID Delegate Protocols](/dt-exchange/sdk-configuration/integrating-the-ios-sdk/delegate-protocols#html-mraid).

## Initializing the Full-Screen Unit Controller <a href="#h_01k5nqvxah0r0bj2hgzhkh1wz5" id="h_01k5nqvxah0r0bj2hgzhkh1wz5"></a>

Initialize the `IAMFullscreenUnitController`:

{% code title="Objective-C" %}

```objective-c
IAFullscreenUnitController *fullscreenUnitController =
    [IAFullscreenUnitController build:^(id _Nonnull builder) {
      builder.unitDelegate = self;
      // All the required content controllers should be added to the desired
      // unit controller:
      [builder addSupportedContentController:self.videoContentController];
      [builder addSupportedContentController:self.mraidContentController];
    }];
self.unitController = fullscreenUnitController;
// The Fullscreen Unit Controller should be retained by a client side;
```

{% endcode %}

## Declaring Your View Controller <a href="#h_01k5nqvxah2jw0n7ctjz03wd99" id="h_01k5nqvxah2jw0n7ctjz03wd99"></a>

Declare your view controller conforms to `IAUnitDelegate` protocol:

{% code title="Objective-C" %}

```objective-c
@interface YourViewController () <IAVideoContentDelegate,
                                  IAMRAIDContentDelegate,
                                  IAUnitDelegate>
```

{% endcode %}

For more information, see [Unit Content Delegate Protocols](/dt-exchange/sdk-configuration/integrating-the-ios-sdk/delegate-protocols#unit).

## Initializing the Placement <a href="#h_01k5nqq6htf1fx89e7qfjg9vdd" id="h_01k5nqq6htf1fx89e7qfjg9vdd"></a>

Initialize the `IAAdSpot` (placement) and pass your `adRequest` object:

{% code title="Objective-C" %}

```objective-c
IAAdSpot *adSpot = [IAAdSpot build:^(id  _Nonnull builder) {
      builder.adRequest = adRequest; 
// pass here the ad request object;
      [builder addSupportedUnitController:self.unitController];
}];

self.adSpot = adSpot; 
// the Ad Spot should be retained by a client side;
```

{% endcode %}

## Fetching the Ad <a href="#id-01h89dgv9g33ejfkre2yjzefgd" id="id-01h89dgv9g33ejfkre2yjzefgd"></a>

The way in which the ad is fetched depends on the mediation type — Waterfall or SDK Bidding.

### Fetching the Ad for Waterfall <a href="#h_01k7y2q4am7j6p7w3yhxd5hz17" id="h_01k7y2q4am7j6p7w3yhxd5hz17"></a>

In Waterfall mediation, use `fetchAdWithCompletion:` and `showAdAnimated:` to fetch the ad:

{% code title="Objective-C" %}

```objective-c
// Declare a weak var, because of a retained block:
__weak typeof(self) weakSelf = self;

[self.adSpot fetchAdWithCompletion:^(IAAdSpot* _Nullable adSpot,
                                     IAAdModel* _Nullable adModel,
                                     NSError* _Nullable error) {
  if (!error) {
    [weakSelf.unitController showAdAnimated:YES completion:nil];
  }
}];
```

{% endcode %}

### Fetching the Ad for SDK Bidding <a href="#h_01k7y2q4amvh15661rj01q98jk" id="h_01k7y2q4amvh15661rj01q98jk"></a>

In SDK Bidding, DT Exchange must first generate a token for the Mediation SDK to use when sending the request to server.

#### **Generating the Token**

The token can be generated upon SDK initialization.

{% code title="Objective-C" %}

```objective-c
NSString *biddingToken = FMPBiddingManager.sharedInstance.biddingToken;
```

{% endcode %}

Return type: `NSString *`

If an error occurs, the returned value is `nil`.

#### **Loading the Ad**

If DT Exchange wins the auction, load the ad with the `signaldata (adm)` that was received from the server:

{% code title="Objective-C" %}

```objective-c
[self.adSpot
    loadAdWithMarkup:adm
      withCompletion:^(IAAdSpot *_Nullable adSpot, IAAdModel *_Nullable adModel,
                       NSError *_Nullable error) {
        if (error) {
          NSLog(@"Failed to get an ad: %@\n", error);
        } else {
          // If is in-view ad unit response, show in view:
          if (adSpot.activeUnitController == weakSelf.viewUnitController) {
            [weakSelf.viewUnitController showAdInParentView:weakSelf.view];
          }
          // If is fullscreen ad unit response, show as fullscreen:
          else if (adSpot.activeUnitController == weakSelf.fsUnitController) {
            [weakSelf.fsUnitController showAdAnimated:YES completion:nil];
          }
        }
      }];
```

{% endcode %}

## Implementing Mandatory Protocols <a href="#id-01h89dgv9gqh22jgs33prpxq14" id="id-01h89dgv9gqh22jgs33prpxq14"></a>

Implement a view controller for an ad (and other related modal screens) presentation:

{% code title="Objective-C" %}

```objective-c
- (UIViewController* _Nonnull)IAParentViewControllerForUnitController:
    (IAUnitController* _Nullable)unitController {
  return self;

  // In case 'self' is a UIViewController subclass;
}
```

{% endcode %}

Use `IAAdDidReward` to receive rewarded ad callbacks:

{% code title="Objective-C" %}

```objective-c
- (void)IAAdDidReward:(IAUnitController * _Nullable)unitController 
{
    NSLog(@"The ad did reward.");
}
```

{% endcode %}


# All-in-One

To integrate all ad types in one integration, ensure you have integrated the [IASDKCore Libraries](/dt-exchange/sdk-configuration/integrating-the-ios-sdk#h_01h959gwafx2axgb4wwt1nxt6w). Configure the ad placement and its controllers, create an Ad Request, and then fetch and display the ad.

## Importing the SDK <a href="#h_01k56dapegbkdgykkckdvbcw50" id="h_01k56dapegbkdgykkckdvbcw50"></a>

Import the following `IASDKCore` module into your desired view controller:

{% code title="Objective-C" %}

```objective-c
#import <IASDKCore/IASDKCore>.h
```

{% endcode %}

## Creating Properties <a href="#h_01k56dapegvk17480qy3maw1bq" id="h_01k56dapegvk17480qy3maw1bq"></a>

Create properties for all types of controllers and content controllers:

{% code title="Objective-C" %}

```objective-c
@property (nonatomic, strong) IAAdSpot *adSpot; 
@property (nonatomic, strong) IAViewUnitController *viewUnitController; 
@property (nonatomic, strong) IAFullscreenUnitController *fsUnitController; 
@property (nonatomic, strong) IAMRAIDContentController *mraidContentController;
@property (nonatomic, strong) IAVideoContentController *videoContentController;
```

{% endcode %}

Set global variables for SDK bidding provided in `IASDKCore` shared instance:

* `userData`
* `muteAudio`
* `mediationType`
* `debugger`

#### Example:

{% code title="Objective-C" %}

```objective-c
IASDKCore.sharedInstance.userData = userData;
IASDKCore.sharedInstance.muteAudio = YES;
IASDKCore.sharedInstance.mediationType = IAMediationMax.new;
IASDKCore.sharedInstance.debugger = [IADebugger build:^(id _Nonnull builder) {
  builder.server = @"wv.inner-active";
  builder.mockResponsePath = @"bannerresponseforci";
  builder.database = @"4321";
}];
```

{% endcode %}

## Creating the User Data Object <a href="#h_01k56dapegj86hzy4bdx8t8ctz" id="h_01k56dapegj86hzy4bdx8t8ctz"></a>

Optionally, create an `IAUserData` object for better ad targeting:

{% code title="Objective-C" %}

```objective-c
IAUserData *userData = [IAUserData build:^(id _Nonnull builder) {
  builder.age = 34;
  builder.gender = IAUserGenderTypeMale;
  builder.zipCode = @"90210";
}];
IASDKCore.sharedInstance.userData = userData;
```

{% endcode %}

{% hint style="info" %}
The `build:` method is synchronous and runs on the same thread that it is invoked from, similar to iOS's `enumerateObjectsUsingBlock`. As a result, special memory management like `weak` references are not needed inside the block.
{% endhint %}

## Initializing the Ad Request Object <a href="#h_01k56dapeg996dhygwr74btvrt" id="h_01k56dapeg996dhygwr74btvrt"></a>

{% hint style="info" %}
This step is not mandatory for SDK Bidding mediation.
{% endhint %}

Initialize an `IAAdRequest` and provide the `spotID` and a `timeout` value:

{% code title="Objective-C" %}

```objective-c
IAAdRequest *adRequest = [IAAdRequest build:^(id _Nonnull builder) {
  builder.spotID = @"YOUR SPOT ID";
  builder.timeout = 10;
}];
```

{% endcode %}

## Initializing the Controller <a href="#h_01k56dapegqsc1s59rdw68wxhz" id="h_01k56dapegqsc1s59rdw68wxhz"></a>

Initialize the `IAMRAIDContentController`:

{% code title="Objective-C" %}

```objective-c
IAMRAIDContentController *mraidContentController =
    [IAMRAIDContentController build:^(id _Nonnull builder) {
      builder.MRAIDContentDelegate = self;
      // A delegate should be passed in order to get video content related
      // callbacks;
    }];

self.mraidContentController = mraidContentController;
// The MRAID Content ControllerPage should be retained by a client side
```

{% endcode %}

## Declaring Your View Controller <a href="#h_01k56dapeghgmzbsybmxr5w62q" id="h_01k56dapeghgmzbsybmxr5w62q"></a>

Declare that your view controller conforms to the `IAMRAIDContentDelegate` protocol:

{% code title="Objective-C" %}

```
@interface YourViewController () <IAMRAIDContentDelegate> 
```

{% endcode %}

For more information, see [HTML/MRAID Delegate Protocols](/dt-exchange/sdk-configuration/integrating-the-ios-sdk/delegate-protocols#html-mraid).

## Initializing the Video Content Controller <a href="#h_01k56dapegyf523qrgncfcvqqj" id="h_01k56dapegyf523qrgncfcvqqj"></a>

Initialize the `IAMVideoContentController`:

{% code title="Objective-C" %}

```objective-c
IAVideoContentController *videoContentController =
    [IAVideoContentController build:^(id _Nonnull builder) {
      builder.videoContentDelegate = self;
      // A delegate should be passed in order to get video content related
      // callbacks;
    }];

self.videoContentController = videoContentController;
// The Video Content ControllerPage should be retained by a client side
```

{% endcode %}

## Declaring Your View Controller <a href="#h_01k56dapehc0vq4c3qwbvk3a8h" id="h_01k56dapehc0vq4c3qwbvk3a8h"></a>

Declare that the video content controller conforms to the `IAVideoContentDelegate` protocol:

**Objective-C**

{% code title="Objective-C" %}

```objective-c
@interface YourViewController  () <IAMRAIDContentDelegate, IAVideoContentDelegate>
```

{% endcode %}

For more information, see [Video Content Delegate Protocols](/dt-exchange/sdk-configuration/integrating-the-ios-sdk/delegate-protocols#video-content).

## Initializing the View Unit Controller <a href="#h_01k56dapehet17g0qskrcdm82e" id="h_01k56dapehet17g0qskrcdm82e"></a>

Initialize the `IAViewUnitController`:

{% code title="Objective-C" %}

```objective-c
IAViewUnitController *viewUnitController = [IAViewUnitController
    build:^(id<IAViewUnitControllerBuilder> _Nonnull builder) {
      builder.unitDelegate = self;
      // All the required content controllers should be added to the desired
      // unit controller:
      [builder addSupportedContentController:self.videoContentController];
      [builder addSupportedContentController:self.mraidContentController];
    }];
self.viewUnitController = viewUnitController;
// the View Unit Controller should be retained by a client side;
```

{% endcode %}

## Initializing the Full-Screen Unit Controller <a href="#h_01k56dapeh6df3dr9g33fpt93z" id="h_01k56dapeh6df3dr9g33fpt93z"></a>

Initialize the `IAFullscreenUnitController`:

{% code title="Objective-C" %}

```objective-c
IAFullscreenUnitController *fullscreenUnitController =
    [IAFullscreenUnitController build:^(id _Nonnull builder) {
      builder.unitDelegate = self;
      // All the required content controllers should be added to the desired
      // unit controller:
      [builder addSupportedContentController:self.videoContentController];
      [builder addSupportedContentController:self.mraidContentController];
    }];
self.unitController = fullscreenUnitController;
// The Fullscreen Unit Controller should be retained by a client side;
```

{% endcode %}

## Declaring the View Unit Controller and the Full Screen Unit Controller <a href="#h_01k5ebbgegyyvv4zr7qxevrcvw" id="h_01k5ebbgegyyvv4zr7qxevrcvw"></a>

Declare that the video content controller and full screen unit conform to the `IAVideoContentDelegate` protocol:

{% code title="Objective-C" %}

```objective-c
@interface YourViewController () <IAUnitDelegate,
                                  IAMRAIDContentDelegate,
                                  IAVideoContentDelegate>
```

{% endcode %}

For more information, see [Unit Content Delegate Protocols](/dt-exchange/sdk-configuration/integrating-the-ios-sdk/delegate-protocols#unit).

## Initializing the Placement <a href="#h_01k5ebbgegc29m63h08dhjym8j" id="h_01k5ebbgegc29m63h08dhjym8j"></a>

Initialize the `IAAdSpot` (placement) and pass your `adRequest` object:

{% code title="Objective-C" %}

```objective-c
IAAdSpot *adSpot = [IAAdSpot build:^(id _Nonnull builder) {
  builder.adRequest = adRequest;
  // Pass here the ad request object;
  // All the supported (by a client side) unit controllers:
  [builder addSupportedUnitController:self.viewUnitController];
  [builder addSupportedUnitController:self.fsUnitController];
}];
self.adSpot = adSpot;
// The Ad Spot should be retained by a client side
```

{% endcode %}

## Fetching the Ad <a href="#h_01k56dapeh9754tarw5170eny4" id="h_01k56dapeh9754tarw5170eny4"></a>

The way in which the ad is fetched depends on the mediation type — Waterfall or SDK Bidding.

### Fetching the Ad for Waterfall <a href="#h_01k7y38g3djtb7gdacp8751h9e" id="h_01k7y38g3djtb7gdacp8751h9e"></a>

In Waterfall mediation, use `fetchAdWithCompletion:` and `showAdAnimated:completion` to fetch the ad:

{% code title="Objective-C" %}

```objective-c
// Declare a weak property, because of block:
__weak typeof(self) weakSelf = self;
[self.adSpot fetchAdWithCompletion:^(IAAdSpot* _Nullable adSpot,
                                     IAAdModel* _Nullable adModel,
                                     NSError* _Nullable error) {
  if (error) {
    NSLog(@"Failed to get an ad: %@\n", error);
  } else {
    // If is in-view ad unit response, show in view:
    if (adSpot.activeUnitController == weakSelf.viewUnitController) {
      [weakSelf.viewUnitController showAdInParentView:weakSelf.view];
    }
    // If is fullscreen ad unit response, show as fullscreen:
    else if (adSpot.activeUnitController == weakSelf.fsUnitController) {
      [weakSelf.fsUnitController showAdAnimated:YES completion:nil];
    }
  }
}];
```

{% endcode %}

### Fetching the Ad for SDK Bidding <a href="#h_01k7y38g3dxeg4ja12e8ec062c" id="h_01k7y38g3dxeg4ja12e8ec062c"></a>

In SDK Bidding, DT Exchange must first generate a token for the Mediation SDK to use when sending the request to server.

#### **Generating the Token**

The token can be generated upon SDK initialization.

{% code title="Objective-C" %}

```objective-c
NSString *biddingToken = FMPBiddingManager.sharedInstance.biddingToken;
```

{% endcode %}

Return type: `NSString *`

If an error occurs, the returned value is `nil`.

#### **Loading the Ad**

If DT Exchange wins the auction, load the ad with the `signaldata (adm)` that was received from the server:

{% code title="Objective-C" %}

```objective-c
[self.adSpot
    loadAdWithMarkup:adm
      withCompletion:^(IAAdSpot *_Nullable adSpot, IAAdModel *_Nullable adModel,
                       NSError *_Nullable error) {
        if (error) {
          NSLog(@"Failed to get an ad: %@\n", error);
        } else {
          // If is in-view ad unit response, show in view:
          if (adSpot.activeUnitController == weakSelf.viewUnitController) {
            [weakSelf.viewUnitController showAdInParentView:weakSelf.view];
          }
          // If is fullscreen ad unit response, show as fullscreen:
          else if (adSpot.activeUnitController == weakSelf.fsUnitController) {
            [weakSelf.fsUnitController showAdAnimated:YES completion:nil];
          }
        }
      }];
```

{% endcode %}


# Native Ads

To integrate Native Ads, ensure you have integrated the DT Exchange [IASDKCore Libraries](/dt-exchange/sdk-configuration/integrating-the-ios-sdk#h_01h959gwafx2axgb4wwt1nxt6w). Configure the native ad spot, create an Ad Request, and then load the ad and map the assets to your native view components.

## Importing the SDK <a href="#h_01k8pcdpmzntc4v0k5941gfkna" id="h_01k8pcdpmzntc4v0k5941gfkna"></a>

Import the following `IASDKCore` module into your desired view controller:

{% code title="Objective-C" %}

```objective-c
#import <IASDKCore/IASDKCore.h>
```

{% endcode %}

## Creating the Ad Request Object <a href="#h_01k8pcdpmz6bq0t6cdv4qjkk8c" id="h_01k8pcdpmz6bq0t6cdv4qjkk8c"></a>

Initialize an `IAAdRequest` and provide the `spotID` and a timeout value:

{% code title="Objective-C" %}

```objective-c
IAAdRequest *adRequest =
[IAAdRequest build:^(id _Nonnull builder) {
    // Configure ad request if needed
	builder.spotID = @”NATIVE AD SPOT ID”;
	builder.timeout = 15;
}];
```

{% endcode %}

## Declaring Your View Controller <a href="#h_01k8pcdpmzbcymeacwq8eddzpa" id="h_01k8pcdpmzbcymeacwq8eddzpa"></a>

Declare that your view controller conforms to the `IANativeAdDelegate` Protocol:

{% code title="Objective-C" %}

```objective-c
@interface ViewController() <IANativeAdDelegate>
```

{% endcode %}

For more information, see [Unit Content Delegate Protocols](/dt-exchange/sdk-configuration/integrating-the-ios-sdk/delegate-protocols#unit).

## Initializing the Placement <a href="#h_01k8pcdpmzptzyy65yv5gk8t2g" id="h_01k8pcdpmzptzyy65yv5gk8t2g"></a>

Initialize the `IANativeAdSpot` (placement) and pass your `adRequest` object:

{% code title="Objective-C" %}

```objective-c
nativeAdSpot = [IANativeAdSpot build:^(IANativeAdSpot *builder) {
  builder.adRequest = adRequest;
  builder.delegate = self;
  builder.userInfo = @{
    @"placementIdentifier" : parameters.thirdPartyAdPlacementIdentifier
  };  // Optional
}];
```

{% endcode %}

## Fetching the Ad <a href="#h_01k8pcdpmzhp20am4ztbqgsff3" id="h_01k8pcdpmzhp20am4ztbqgsff3"></a>

Native Ads are available only through SDK Bidding. In SDK Bidding, DT Exchange must first generate a token for the Mediation SDK to use when sending the request to server.

### Generating the Token <a href="#h_01k8pcdpmzyfpw6sbhx5hafbjm" id="h_01k8pcdpmzyfpw6sbhx5hafbjm"></a>

The token can be generated upon SDK initialization.

{% code title="Objective-C" %}

```objective-c
NSString *biddingToken = FMPBiddingManager.sharedInstance.biddingToken;
```

{% endcode %}

Return type: `NSString *`

If an error occurs, the returned value is `nil`.

### Loading the Ad <a href="#h_01k8pcdpmz13f2vv4dqx533bcg" id="h_01k8pcdpmz13f2vv4dqx533bcg"></a>

If DT Exchange wins the auction, load the ad with the `signaldata (adm)` that was received from the server:

{% code title="Objective-C" %}

```objective-c
__weak typeof(self) weakSelf = self;
[self.nativeAdSpot
    loadAdWithMarkup:bidResponse
      withCompletion:^(IANativeAdAssets *nativeAdAssets, NSError *error) {
        if (nativeAdAssets != nil) {
          NSString *title = nativeAdAssets.adTitle;
          NSString *adDescription = nativeAdAssets.adDescription;
          NSString *callToActionText = nativeAdAssets.callToActionText;
          UIView *appIcon = nativeAdAssets.appIcon;
          UIView *mediaView = nativeAdAssets.mediaView;
          NSString *advertiserName = nativeAdAssets.advertiserName;
          NSNumber *rating = nativeAdAssets.rating;
          NSNumber *mediaAspectRatio = nativeAdAssets.mediaAspectRatio;
        } else if (error != nil) {
          NSLog(@"Error: %@", error);
        }
      }];
```

{% endcode %}

For a complete list of Native Ads asset types, see the [oRTB Specfication for Native Ads](https://gitlab.com/digitalturbine/dt-developer-portal/gitbook/-/blob/main/14_exchange_dsp/dt-exchange-openrtb-2.5-specs#object-native).

## Registering Views for Interaction <a href="#h_01k8pcdpmzj0617y2m92h6k3j7" id="h_01k8pcdpmzj0617y2m92h6k3j7"></a>

You must register the views that will respond to user interaction, such as clicks. It is recommended to use the provided ViewTag enumeration for mapping views.

{% code title="Objective-C" %}

```objective-c
@objc public enum ViewTag: Int {
    case title = 1
    case mediaView = 2 // both main image and video share this tag
    case icon = 4
    case description = 5
    case rating = 6
    case cta = 7
    case root = 8
}
```

{% endcode %}

After setting the tags on your views, register them with the ad assets:

{% code title="Objective-C" %}

```objective-c
container.tag = ViewTagRoot;
mediaViewHolder.tag = ViewTagMediaView;
iconHolder.tag = ViewTagIcon;
adTitle.tag = ViewTagTitle;
ratingLabel.tag = ViewTagLabel;
adDescription.tag = ViewTagDescription;
ctaButton.tag = ViewTagCta;

// Register Views for Interaction
[nativeAdAssets registerViewForInteraction:container
    mediaView:mediaViewHolder
    iconView:iconHolder
    clickableViews:@[
        adTitle,
        ratingLabel,
        adDescription,
        ctaButton
]];
```

{% endcode %}


# Delegate Protocols

The DT Exchange SDK delegate protocols include the following methods:

* [Global Ad](#global-a-d)
* [Unit](#unit)
* [Video](#video-content)
* [HTML/MRAID](#html-mraid)

## Global Ad

To receive global SDK callbacks, implement the `IAGlobalAdDelegate` methods.

### Assigning the Delegate Implementor

Use the following API to assign the delegate implementor:

{% code title="Objective-C" %}

```objective-c
IASDKCore.sharedInstance.globalAdDelegate = ;
```

{% endcode %}

**Example**

{% code title="Objective-C" %}

```objective-c
IASDKCore.sharedInstance.globalAdDelegate = self;
```

{% endcode %}

For more information see, [Impression Level Data](/dt-exchange/sdk-configuration/integrating-the-ios-sdk/impression-level-data).

## Unit

{% hint style="warning" %}
`IAParentViewControllerForUnitController:unitController` is a required delegate method. When an ad transitions to full-screen, the IASDK will need to get a "parent" view controller, and this method will be invoked. If it is not implemented, the app will crash with an exception, intentionally, indicating the missing required method implementation.

This delegate method is required to get a client-side view controller to present modal views, such as an in-app browser, StoreKit controller, MRAID expand, etc. In this method, the client side returns a desired view controller. In most cases, it will be the same view controller that presents an ad.
{% endhint %}

### Parent View Controller

`IAParentViewControllerForUnitController:` Parent view controller evaluation from a publisher to render ads in full-screen or modal mode.

{% code title="Objective-C" %}

```objective-c
- (UIViewController* _Nonnull)IAParentViewControllerForUnitController:
    (IAUnitController* _Nullable)unitController {
  return self;  // in case 'self' is a UIViewController subclass;
}
```

{% endcode %}

{% hint style="info" %}
All other delegate methods of this protocol (interface) are optional.
{% endhint %}

### User Click

`IAAdDidReceiveClick:` will be invoked when the user clicks an ad.

{% code title="Objective-C" %}

```objective-c
- (void)IAAdDidReceiveClick:(IAUnitController * _Nullable)unitController {
    NSLog(@"ad did click");
}
```

{% endcode %}

### Ad Impression

`IAAdWillLogImpression:` will be invoked when the ad is rendered and is visible.

{% code title="Objective-C" %}

```objective-c
- (void)IAAdWillLogImpression:(IAUnitController * _Nullable)unitController {
    NSLog(@"ad impression");
}
```

{% endcode %}

### Future Fullscreen Transition Notification

`IAUnitControllerWillPresentFullscreen:` indicates that the transition from full-screen mode will be performed.

{% code title="Objective-C" %}

```objective-c
- (void)IAUnitControllerWillPresentFullscreen:(IAUnitController * _Nullable)unitController {
    NSLog(@"ad will present fullscreen");
}
```

{% endcode %}

#### Notification of Performed Fullscreen Transition

`IAUnitControllerDidPresentFullscreen:` indicates that the transition to full screen already performed.

{% code title="Objective-C" %}

```objective-c
- (void)IAUnitControllerDidPresentFullscreen:(IAUnitController * _Nullable)unitController {
    NSLog(@"ad did present fullscreen");
}
```

{% endcode %}

### Future Transition from Fullscreen Notification

`IAUnitControllerWillDismissFullscreen:` indicates that the transition from full-screen mode will happen.

{% code title="Objective-C" %}

```objective-c
(void)IAUnitControllerWillDismissFullscreen:(IAUnitController * _Nullable)unitController {
    NSLog(@"ad will dismiss fullscreen");
}
```

{% endcode %}

#### Notification of Performed Transition from Fullscreen Mode

`IAUnitControllerDidDismissFullscreen:` indicates that the transition from full-screen mode already performed.

{% code title="Objective-C" %}

```objective-c
(void)IAUnitControllerDidDismissFullscreen:(IAUnitController * _Nullable)unitController {
    NSLog(@"ad did dismiss fullscreen");
}
```

{% endcode %}

### Opening an External App Notification

`IAUnitControllerWillOpenExternalApp:` is a notification that your app will move to the background, and an external app, such as Safari, the App Store, or a Universal link-supported app, will open.

{% code title="Objective-C" %}

```objective-c
(void)IAUnitControllerWillOpenExternalApp:(IAUnitController * _Nullable)unitController {
    NSLog(@"ad will open external app");
}
```

{% endcode %}

## Video Content

{% hint style="info" %}
All video delegate methods are optional.
{% endhint %}

### Video Completion Event

`IAVideoCompleted:` is invoked on video completion.

{% code title="Objective-C" %}

```objective-c
- (void)IAVideoCompleted:(IAVideoContentController * _Nullable)contentController {
    NSLog(@"video completed");
}
```

{% endcode %}

### Interruption Event

`videoInterruptedWithError:` invoked if a video started to play, as the ad was already received, but the buffer became empty for some reason and didn't refill.

{% code title="Objective-C" %}

```objective-c
- (void)IAVideoContentController:(IAVideoContentController * _Nullable)contentController
                  videoInterruptedWithError:(NSError * _Nonnull)error {
    NSLog(@"video interrupted");
}
```

{% endcode %}

### Video Duration Received

`videoDurationUpdated:` updated the video's duration.

{% code title="Objective-C" %}

```objective-c
(void)IAVideoContentController:(IAVideoContentController * _Nullable)contentController
                videoDurationUpdated:(NSTimeInterval)videoDuration {
    NSLog(@"video duration updated");
}
```

{% endcode %}

### Progress Tracking

`videoProgressUpdatedWithCurrentTime:totalTime:` is invoked each time the video has played for a certain number of milliseconds.

{% code title="Objective-C" %}

```objective-c
(void)IAVideoContentController:(IAVideoContentController * _Nullable)contentController
     videoProgressUpdatedWithCurrentTime:(NSTimeInterval)currentTime
                              totalTime:(NSTimeInterval)totalTime {
    NSLog(@"video progress updated");
}
```

{% endcode %}

## HTML/MRAID

MRAID delegate methods allow you to manage interactive HTML ad behavior, including resize, expand, and collapse events.

{% hint style="info" %}
All HTML / MRAID delegate methods are optional.
{% endhint %}

### MRAID Resize Event (Future)

`MRAIDAdWillResizeToFrame:` will be invoked on the MRAID Resize command, before the ad transformation.

{% code title="Objective-C" %}

```objective-c
- (void)IAMRAIDContentController:(IAMRAIDContentController * _Nullable)contentController 
                  MRAIDAdWillResizeToFrame:(CGRect)frame {
    NSLog(@"MRAIDAdWillResizeToFrame");
    self.isMRAIDResize = YES; // a way to distinct in 'collapse', whether was resize or expand;
    
    if (!self.adView.translatesAutoresizingMaskIntoConstraints) { 
        // a way to distinct the work with constraints;
        // ok, we are working with constraints, if so - it is publisher responsibility to treat MRAID:RESIZE:
        //
        // 1. remove existing constraints from adView (in this method);
        // 2. set new constraints, satisfying the received frame ('MRAIDAdDidResizeToFrame' method);
        //
        // note: that if you are not working with constraints, the adView will treat all the needed sizes, 
        // but you will need to setup other UI in current view controller, according to adView's new frame;
        // note: MRAID:EXPAND is MODAL, so no need to implement the same work;
        [self.adView removeFromSuperview]; // remove self.view <--> adView constraints;
    }
    
    // the rest of work is implemented inside the 'MRAIDAdDidResizeToFrame:' method;
}</-->
```

{% endcode %}

### MRAID Resize Event (Happened)

`MRAIDAdDidResizeToFrame:` will be invoked on MRAID Resize completion.

{% code title="Objective-C" %}

```objective-c
- (void)IAMRAIDContentController:(IAMRAIDContentController * _Nullable)contentController 
                 MRAIDAdDidResizeToFrame:(CGRect)frame {
    NSLog(@"MRAIDAdDidResizeToFrame");
    
    // means we are working with constraints;
    if (!self.adView.translatesAutoresizingMaskIntoConstraints) {
        [self.viewUnitController showAdInParentView:self.view]; 
        // add once again to view, because was removed previously in order to remove constraints;
        
        // if so, it is on publisher responsibility to set up a new consrtraints:
        [self.view addConstraint:
         [NSLayoutConstraint constraintWithItem:self.adView
                                      attribute:NSLayoutAttributeLeading
                                      relatedBy:NSLayoutRelationEqual
                                         toItem:self.view
                                      attribute:NSLayoutAttributeLeading
                                     multiplier:1
                                       constant:frame.origin.y]];
        
        [self.view addConstraint:
         [NSLayoutConstraint constraintWithItem:self.adView
                                      attribute:NSLayoutAttributeWidth
                                      relatedBy:NSLayoutRelationEqual
                                         toItem:nil
                                      attribute:NSLayoutAttributeWidth
                                     multiplier:1
                                       constant:frame.size.width]];
        
        [self.view addConstraint:
         [NSLayoutConstraint constraintWithItem:self.adView
                                      attribute:NSLayoutAttributeHeight
                                      relatedBy:NSLayoutRelationEqual
                                         toItem:nil
                                      attribute:NSLayoutAttributeHeight
                                     multiplier:1
                                       constant:frame.size.height]];
    } else {
        // working with 'frame',
        // set up your UI according to adView's new frame;
    }
}
```

{% endcode %}

### MRAID Expand Event (Future)

`MRAIDAdWillExpandToFrame:` will be invoked on the MRAID Expand command, before the ad transformation.

{% code title="Objective-C" %}

```objective-c
- (void)IAMRAIDContentController:(IAMRAIDContentController * _Nullable)contentController 
                 MRAIDAdWillExpandToFrame:(CGRect)frame {
    NSLog(@"MRAIDAdWillExpandToFrame");
    
    self.isMRAIDResize = NO; 
// boolean flag to distinct whether 'collapse' event is after 'resize' or 'expand'
}
```

{% endcode %}

### MRAID Expand Event (Happened)

`MRAIDAdDidExpandToFrame:` will be invoked on the MRAID Expand completion event.

{% code title="Objective-C" %}

```objective-c
- (void)IAMRAIDContentController:(IAMRAIDContentController * _Nullable)contentController 
                MRAIDAdDidExpandToFrame:(CGRect)frame {
    NSLog(@"MRAIDAdDidExpandToFrame");
}
```

{% endcode %}

### MRAID Collapse Event (Future)

`IAMRAIDContentControllerMRAIDAdWillCollapse:` will be invoked on an MRAID Collapse command, before the ad transformation.

{% code title="Objective-C" %}

```objective-c
NSLog(@"IAMRAIDContentControllerMRAIDAdWillCollapse");

// if we are working with constraints AND there was resize before (not expand):
if (!self.adView.translatesAutoresizingMaskIntoConstraints && self.isMRAIDResize) {
    // the same as in 'MRAIDAdWillResizeToFrame';
    [self.adView removeFromSuperview];
}
```

{% endcode %}

### MRAID Collapse Event (Happened)

`IAMRAIDContentControllerMRAIDAdDidCollapse:` will be invoked upon MRAID Collapse completion.

{% code title="Objective-C" %}

```objective-c
- (void)IAMRAIDContentControllerMRAIDAdDidCollapse:(IAMRAIDContentController * _Nullable)contentController {
    NSLog(@"IAMRAIDContentControllerMRAIDAdDidCollapse");
    
    // if we are working with constraints AND there was resize before (not expand):
    if (!self.adView.translatesAutoresizingMaskIntoConstraints && self.isMRAIDResize) {
        // restore everything as it was before resize (in case it is resize):
        [self.viewUnitController showAdInParentView:self.view];
        
        // adding centerX constraint
        [self.view addConstraint:
         [NSLayoutConstraint constraintWithItem:self.adView
                                      attribute:NSLayoutAttributeCenterX
                                      relatedBy:NSLayoutRelationEqual
                                         toItem:self.view
                                      attribute:NSLayoutAttributeCenterX
                                     multiplier:1
                                       constant:0]];
        
        // adding top constraint
        [self.view addConstraint:
         [NSLayoutConstraint constraintWithItem:self.adView
                                      attribute:NSLayoutAttributeTop
                                      relatedBy:NSLayoutRelationEqual
                                         toItem:self.view
                                      attribute:NSLayoutAttributeTop
                                     multiplier:1
                                       constant:0]];
    }
}
```

{% endcode %}


# Dynamic Floor Pricing

{% hint style="success" %}
This feature requires explicit enablement by DT.\
Please contact your DT Commercial Representative before using this feature. If the feature is used without proper enablement, it may not work as expected.
{% endhint %}

Setting a dynamic floor price allows you to establish a custom price for your ad requests. To configure a dynamic floor price, set the `floorPrice` property of `IAAdRequest` with a double value representing the custom floor price in USD, as described in the following example:

{% tabs %}
{% tab title="Objective-C" %}

```objective-c
IAAdRequest *adRequest =
[IAAdRequest build:^(id  _Nonnull builder) { 
    builder.spotID = @"YOUR_SPOT_ID";    
    builder.floorPrice = @(3.14); 
}];

```

{% endtab %}

{% tab title="Swift" %}

```swift
let request = IAAdRequest.build { adRequest in
    adRequest.spotID = "YOUR_SPOT_ID"
    adRequest.floorPrice = 3.14
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Submit the `floorPrice` value in CPM (cost per 1000 impressions), not per single impression.
{% endhint %}


# User Signals API

As of DT Exchange iOS SDK version 8.4.3, publishers can submit first-party data (user signals) such as The Trade Desk UID2 tokens and LiveRamp envelopes. Submitting user signals provides DT with deeper insights into user behavior and publisher-specific metrics so that we can better target ads to your users and increase fill rates. Additionally, if you are mediating DT Exchange, implementation of User Signals remains the same, no matter which mediation platform you use.

To submit user signals:

1. Ensure that you have integrated the latest DT Exchange Android SDK.\
   For the latest version, see [Integrating the iOS SDK](/dt-exchange/sdk-configuration/integrating-the-ios-sdk).
2. For each [user signal](#h_01kd871ggetf9pv4c9pap41ygn) you want to submit, send the data as key-value pairs in the [`setExtraData` method](#h_01kd871ggesvzdp618sc6d0r33) within the `InneractiveAdManager`.

{% hint style="info" %}

* This method must be called after the SDK init, but before initiating an ad request or creating a bidding token.
* To pass multiple user signals, call the method once for every data point you wish to send.
* Calling the `setExtraData` method with a key that has already been sent overwrites the previous value associated with that key.
  {% endhint %}

## Method Signature <a href="#h_01kd871ggesvzdp618sc6d0r33" id="h_01kd871ggesvzdp618sc6d0r33"></a>

{% code title="Objective-C" %}

```objective-c
- (void)setExtraDataForKey:(nonnull NSString *)key
                     value:(nullable NSString *)value
NS_SWIFT_NAME(setExtraData(key:value:));
```

{% endcode %}

## User Signals <a href="#h_01kd871ggetf9pv4c9pap41ygn" id="h_01kd871ggetf9pv4c9pap41ygn"></a>

Submit any of the following user signals as key-value pairs in the `setExtraData` method. The maximum value you can send is 512 characters. To delete a value previously set for a key, specify `nil`.

| KEY  | VALUE                                                          |
| ---- | -------------------------------------------------------------- |
| UID2 | UID2.0 token from The Trade Desk.                              |
| LRE  | <p>LiveRamp envelope.</p><p>Do not submit the LiveRamp ID.</p> |

## Example <a href="#h_01kd871ggee5nwxr3d8w69g4tk" id="h_01kd871ggee5nwxr3d8w69g4tk"></a>

{% tabs %}
{% tab title="Swift" %}

```swift
// Passing the first parameter
IASDKCore.sharedInstance().setExtraData(key: "UID2", value: "UID2.0_access_token")

// Passing the second parameter
IASDKCore.sharedInstance().setExtraData(key: "LRE", value: "LiveRamp_envelope")

// Removing a custom parameter
IASDKCore.sharedInstance().setExtraData(key: "UID2", value: nil)
```

{% endtab %}

{% tab title="Objective-C" %}

```objective-c
// Passing the first parameter
[[IASDKCore sharedInstance] setExtraDataWithKey:@"key1" value:@"value1"];

// Passing the second parameter
[[IASDKCore sharedInstance] setExtraDataWithKey:@"key2" value:@"value2"];

// Removing a custom parameter
[[IASDKCore sharedInstance] setExtraDataWithKey:@"key1" value:nil];
```

{% endtab %}
{% endtabs %}


# Impression Level Data

DT Exchange enables you to access detailed information for each impression through the impressions callback APIs. The information includes, for example, which demand source served the ad and its expected or exact revenue.

The following table describes Impression Level Data attributes.

| Property Name      | Description                                                                                                                                                                                                                                                                                                                |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `demandSourceName` | <p>Identifies the demand source name of the buy-side/demand-side entity that purchased the impression:<br></p><ul><li>When mediated networks win an impression, the mediated network's name appears.</li><li>When a DSP buying through the programmatic marketplace wins the impression, the DSP's name appears.</li></ul> |
| `country`          | Identifier of the country of the ad impression (in ISO country code).                                                                                                                                                                                                                                                      |
| `sessionID`        | A unique identifier for a specific impression.                                                                                                                                                                                                                                                                             |
| `advertiserDomain` | A unique identifier for a set of campaigns for the same advertiser.                                                                                                                                                                                                                                                        |
| `creativeID`       | <p>A unique identifier that represents the creative in the bid response.<br>This can be useful when a particular creative causes user experience issues.</p>                                                                                                                                                               |
| `campaignID`       | A unique identifier that represents a Campaign.                                                                                                                                                                                                                                                                            |
| `pricingValue`     | The impression’s net payout value                                                                                                                                                                                                                                                                                          |
| `pricingCurrency`  | The impression’s currency type                                                                                                                                                                                                                                                                                             |
| `duration`         | The duration of the video in seconds, for example, 15 seconds.                                                                                                                                                                                                                                                             |
| `Skippable`        | <p>An indication of whether the video is skippable or not<br>(<code>1</code> = true, <code>0</code> = false).</p>                                                                                                                                                                                                          |

## Impression Data Callback Methods <a href="#h_01jyeypwhwey8s2nyh4qwtqe8t" id="h_01jyeypwhwey8s2nyh4qwtqe8t"></a>

Run the following required API to implement the callback.

{% code title="Objective-C" %}

```objective-c
- (void)adDidShowWithImpressionData:(IAImpressionData * _Nonnull)impressionData
                      withAdRequest:(IAAdRequest * _Nonnull)adRequest;
```

{% endcode %}

### Subscription <a href="#h_01jyf03zcmw2drh3h82ygebxea" id="h_01jyf03zcmw2drh3h82ygebxea"></a>

{% code title="Objective-C" %}

```objective-c
IASDKCore.sharedInstance.globalAdDelegate = self;
```

{% endcode %}

### Implementation <a href="#id" id="id"></a>

{% code title="Objective-C" %}

```objective-c
#pragma mark - IAGlobalAdDelegate

- (void)adDidShowWithImpressionData:(IAImpressionData * _Nonnull)impressionData
                      withAdRequest:(IAAdRequest * _Nonnull)adRequest {
    NSLog(@"\n\nAd did show with impression data\
          \ndemandSourceName: %@\
          \ncountry: %@\
          \nsessionID: %@\
          \nadvertiserDomain: %@\
          \ncreativeID: %@\
          \ncampaignID: %@\
          \npricing value: %@\
          \npricingCurrency: %@\
          \nduration: %@\
          \nisSkippable: %@\
          \nspotID: %@\
          \nunitID: %@",
          impressionData.demandSourceName,
          impressionData.country,
          impressionData.sessionID,
          impressionData.advertiserDomain,
          impressionData.creativeID,
          impressionData.campaignID,
          impressionData.pricingValue,
          impressionData.pricingCurrency,
          impressionData.duration,
          impressionData.skippable ? @"YES" : @"NO",
          adRequest.spotID,
          adRequest.unitID);
    NSLog(@"\n");
}
```

{% endcode %}

<br>


# DT Exchange Logging on iOS

The DT Exchange iOS SDK includes a built-in logging utility, `DTXLogger`, that monitors SDK behavior and streamlines integration debugging. You can control how much detail appears in the console output by setting the desired log level.

Set the log level before or immediately after calling `initWithAppID()` to ensure that initialization events are logged.

The following table describes the log level attributes.

| Property Name | Description                                               |
| ------------- | --------------------------------------------------------- |
| `.debug`      | <p>Enables full logging.<br>Use this for development.</p> |
| `.off`        | <p>Disables all logging.<br>Use this for production.</p>  |

## Setting the Log Level

To configure the library's logging level, call `DTXLogger.setLogLevel` and pass the desired log level.

The following example initializes the SDK and then sets the log level to `.debug`:

{% code title="Swift" %}

```swift
IASDKCore.sharedInstance()?.initWithAppID(
    appId,
    completionBlock: { success, error in
        if let error {
            print("DTExchange init failed: \(error.localizedDescription)")
        } else {
            print("DTExchange init success")
        }
    },
    completionQueue: .main
)

// Set the desired log level
// Use .debug for full logs during development or .off for production
DTXLogger.setLogLevel(.debug)
```

{% endcode %}


# DT Exchange iOS Changelog

> Get the [latest DT Exchange iOS SDK](/dt-exchange/sdk-configuration/integrating-the-ios-sdk).

{% updates format="full" %}
{% update date="2026-08-05" %}

## Version 8.4.10

**Improved:**

* Improved Click Handling

**Fixed**:

* Fixed crash introduced in 8.4.9 caused due to a combination of Swift Compiler Settings and specific Xcode version used for release
* Stability and bug fixes
  {% endupdate %}

{% update date="2026-07-28" %}

## Version 8.4.9

{% hint style="warning" %}
A potential crash has been fixed in version 8.4.10.
{% endhint %}

**New**:

* Minimum Supported Xcode is now 26.1 (following the Apple Swift Compiler issue introduced in Xcode 26.0 and fixed in Xcode 26.1)

**Fixed**:

* Stability and bug fixes
  {% endupdate %}

{% update date="2026-06-28" %}

## Version 8.4.8

**New**:

* Minimum Supported iOS is now 15, following the Apple Requirements

**Fixed**:

* Stability and bug fixes
  {% endupdate %}

{% update date="2026-04-30" %}

## Version 8.4.7

**New**:

* Added Support for SKOverlay in Embedded Browser
* Added support for [Vietnam's Amended Law on Advertising](/dt-exchange/getting-started-with-dt-exchange/privacy/vietnams-amended-law-on-advertising)

**Fixed**:

* Stability and bug fixes
  {% endupdate %}

{% update date="2026-03-25" %}

## Version 8.4.6

**New**:

* Added Support for IAB’s Global Privacy Platform (see [GPP](/dt-exchange/getting-started-with-dt-exchange/privacy/gpp))
* Added Support for Google Mobile Ads SDK 13.0.0

**Fixed**:

* Stability and bug fixes

**Deprecated**:

* Deprecated User Age API
* Removed Video Play/Pause API (breaking changes)
  {% endupdate %}

{% update date="2026-02-16" %}

## Version 8.4.5

**Fixed**:

* Stability and bug fixes
  {% endupdate %}

{% update date="2026-02-02" %}

## Version 8.4.4

**Fixed**:

* Performance and stability improvements
  {% endupdate %}

{% update date="2025-12-30" %}

## Version 8.4.3

**New**

* Added `setExtraDataForKey:value:` [API](/dt-exchange/sdk-configuration/integrating-the-ios-sdk/user-signals-api) to `IASDKCore` \[Developer Preview]

**Improvements**:

* Use `IABTCF_gdprApplies` flag to determine if DTX SDK should read TCF values on device

**Fixed**:

* Performance and stability improvements
  {% endupdate %}

{% update date="2025-11-19" %}

## Version 8.4.2

**New**:

* Added a `floorPrice` API to (to the Ad Request Class) \[Developer Preview]

For more information, see [Dynamic Floor Pricing](/dt-exchange/sdk-configuration/integrating-the-ios-sdk/dynamic-floor-pricing-developer-preview).

* Updated Open Measurement (OM) SDK to v1.6.0

**Fixed**:

* Fixed crash in edge case when an ad failed to load in SDK Bidding
* Performance and Stability improvements
  {% endupdate %}

{% update date="2025-10-21" %}

## Version 8.4.1

**Fixed:**

* Crash related to video player (following iOS 26 change)
* Stability and bug fixes
  {% endupdate %}

{% update date="2025-10-09" %}

## Version 8.4.0

**New:**

* Added support for Native Ads
* iOS 26 Support

**Fixed:**

* Fixed crash related to MRAID view hierarchy
  {% endupdate %}

{% update date="2025-07-16" %}

## Version 8.3.8

**New:**

* Support MRAID videos in MREC

**Fixed:**

* Fixed crash when attempting to attach a window to an invalidated scene
* Stability and bug fixes
  {% endupdate %}

{% update date="2025-05-28" %}

## Version 8.3.7

**New:**

* The minimum supported iOS version is now iOS 13
* Increased minimum supported Xcode version to 16
* Updated Open Measurement (OM) SDK to v1.5.4
* Updated support for the latest Google Mobile Ads SDK v12
* Removed the `useSecureConnections` API

**Fixed:**

* Resolved crash related to supported interface orientations
* Stability and bug fixes
  {% endupdate %}

{% update date="2025-03-17" %}

## Version 8.3.6

**Improvements:**

* Playable full-screen ads improvements
* VAST Companion improvements

**Fixed:**

* Fixed crash happening in certain cases related to VAST creatives
* Stability and bug fixes
  {% endupdate %}

{% update date="2025-01-28" %}

## Version 8.3.5

**Improvements:**

* Improved the SDK initialization process
* Updated DV360 SCAR integration to use the new Google Mobile Ads SDK 11.7.0 API

**Fixed:**

* Fixed bugs in rendering specific types of VAST Companions
* Stability and bug fixes

**Deprecations:**

* Deprecated the ‘useSecureConnections’ API
  {% endupdate %}

{% update date="2024-12-03" %}

## Version 8.3.4

{% hint style="warning" %}
Due to a rise in the frequency of crashes affecting this version, we strongly recommend updating to version 8.3.5, which fixes the underlying issue.
{% endhint %}

**New:**

* Added Auto StoreKit feature for Fullscreen Display Ads
* Added SKOverlay support for Fullscreen Display Ads

**Fixed:**

* Minor bug fixes
  {% endupdate %}

{% update date="2024-11-21" %}

## Version 8.3.3

{% hint style="warning" %}
Due to a rise in the frequency of crashes affecting this version, we strongly recommend updating to version 8.3.5, which fixes the underlying issue.
{% endhint %}

**New:**

* Increased minimum supported Xcode version: from 15.2 to 15.3
* Added Support for HLS (HTTPS Live Streaming) video

**Improvements:**

* Improved banner ads rendering
* Improved full-screen ads rendering
* Stability and bug fixes

**Deprecations**:

* The global manager IASDKCore `keywords` property is deprecated
  {% endupdate %}

{% update date="2024-08-29" %}

## Version 8.3.2

**New:**

* Added support for (Open Measurement) OMSDK v1.5.0

**Improvements:**

* SKOverlay rendering improvements
* Stability and bug fixes
  {% endupdate %}

{% update date="2024-07-02" %}

## Version 8.3.1

**Fixed:**

* Crash related to empty TCF purpose consents
  {% endupdate %}

{% update date="2024-06-10" %}

## Version 8.3.0

{% hint style="warning" %}
This version has been identified to have a critical issue leading to crashes when fetching an empty TCF purpose consent. Please update to a newer version or revert to the 8.2.8 version.
{% endhint %}

**New:**

* The minimum supported iOS version is now iOS 12
* Added support for reading TCF purpose consents values
* Added support for resource-less companion click tracking
* Added support for (Open Measurement) OMSDK v1.4.12

**Improvements:**

* VAST video UX improvements

**Fixed:**

* Fixed parsing issues due to iOS 17 NSURL changes
* Stability and bug fixes
  {% endupdate %}

{% update date="2024-04-17" %}

## Version 8.2.8

**Improvements:**

* muteAudio API now also supports rewarded videos
* Improved Privacy Manifest ingestion when SDK is integrated via Cocoapods

**Fixed:**

* Stability and minor improvements
  {% endupdate %}

{% update date="2024-03-13" %}

## Version 8.2.7

{% hint style="warning" %}
If you are updating to this version using Cocoapods, the DT Exchange SDK’s privacy information must be manually integrated into your app’s privacy report with this version.

The next version will support the auto-filling of the app's privacy manifest.
{% endhint %}

**New:**

* Added a Privacy Manifest
* Updated to a static framework
* Added support for reading TCF v2 consent values

**Improvements:**

* Added support for the latest Google Mobile Ads SDK v11
* Added enhancements for DSA support

**Fixed:**

* OMSDK tracking update
* Stability and bug fixes
  {% endupdate %}

{% update date="2023-12-26" %}

## Version 8.2.6

**Fixed:**

* Stability and bug fixes
  {% endupdate %}

{% update date="2023-11-28" %}

## Version 8.2.5

**New:**

* Added support for (Open Measurement) OMSDK v1.4.8

**Improvements:**

* VAST Companion improvements

**Fixed:**

* SKAdNetwork v4.0 and SKOverlay attribution bug
  {% endupdate %}

{% update date="2023-08-06" %}

## Version 8.2.4

**New**:

* Minimum Xcode version supported: 14.1
* Ad reporting support

**Fixed**:

* Bug fixes
  {% endupdate %}

{% update date="2023-07-05" %}

## Version 8.2.3

**New**:

* Added support for VAST V3 progress tracking events
* Added support for using Apple’s Custom Product Pages (CPP) with SKAdNetwork and SKOverlay
* Added [Auto Store](/dt-ads-demand/dt-exchange-openrtb-2.5-specs/auto-store) feature for video ads

**Improvements**:

* The deprecated request’s object properties userData, keywords, location and muteAudio were removed. These properties became part of the global manager IASDKCore.

**Fixed**:

* Memory Leak
* Minor bug fixes
  {% endupdate %}

{% update date="2023-05-01" %}

## Version 8.2.2

**Fixed**:

* VAST parser bug fix
  {% endupdate %}

{% update date="2023-04-19" %}

## Version 8.2.1

**New**:

* **The minimum supported iOS version is now iOS 11**
* Added support for SKADNetwork 4.0
* Removed Location API
* Removed ***IALogger API***; Added ***DTXLogger*** API (used for setting logging level)
* Removed obsolete architectures: armv7, i386

**Fixed**:

* Critical issue when SDK version could be overridden in info.plist
* Stability and minor improvements
  {% endupdate %}

{% update date="2023-03-13" %}

## Version 8.2.0

**New**:

* Added support for HTML Video within OMSDK
* Added support for (Open Measurement) OMSDK v1.4.2
* Added support for [AdMob v10](https://developers.google.com/admob/ios/migration#migrate-to-sdk-v10) breaking changes
* Added support for WKWebView’s fullscreenState of iOS 16

**Improvements**:

* Improved rendering logic for brand campaigns
* Performance and stability improvements

**Fixed**:

* Crash occurring in cases where the application uses an AdMob version 10.0.0 or above with DT Exchange SDK version below 8.2.0 (due to AdMob v10 breaking changes)
  {% endupdate %}

{% update date="2023-01-17" %}

## Version 8.1.9

**New**:

* Added support for SKOverlay

**Improvements**:

* Performance and stability improvements

**Fixed**:

* Crash in certain cases after MRAID ads load timeout
* Crash related to Core telephony
  {% endupdate %}

{% update date="2022-11-08" %}

## Version 8.1.7

{% hint style="warning" %}
This version has been identified to have a critical issue leading to crashes when loading Rewarded Ads. Please update to a newer version or revert to the 8.1.6 version.
{% endhint %}

**Improvements**:

* Performance and stability improvements on iOS 16 devices

**Fixed**:

* Crash in a specific mediation scenario related to banner refresh
  {% endupdate %}

{% update date="2022-09-08" %}

## Version 8.1.6

**New**:

* Added support for iOS 16 API changes. Not using deprecated API of iOS 16 starting from iOS 16
* Added support for (Open Measurement) OMSDK v1.3.34

**Improvements**:

* The request’s object properties userData, keywords, location and muteAudio are deprecated now. These properties became part of the global manager IASDKCore

**Fixed**:

* Crash on a certain edge case when clicking twice on banners
* Performance and Stability improvements
  {% endupdate %}

{% update date="2022-05-25" %}

## Version 8.1.5

**New**:

* Added new API and support for LGPD (Brazilian GDPR)
* Support Apple App Store’s [Custom Product Pages](/dt-ads-demand/dt-exchange-openrtb-2.5-specs/custom-product-pages) introduced in iOS 15

**Improvements**:

* Added support for latest Google Mobile Ads SDK v9
* Support of VAST wrappers ClickThrough in case it is missing in the in-line VAST

**Fixed**:

* Unresponsive StoreKit when a user clicks twice on an ad in iOS 15.5
* CompanionClickThrough was not sent in a specific scenario
* Handled SKAdNetwork new errors in iOS 15.3
* Minor bug fixes
  {% endupdate %}

{% update date="2022-03-09" %}

## Version 8.1.4

**New**:

* Added support for (Open Measurement) OMSDK v1.3.30
* Support companion click tracking of VAST wrappers
* Performance and stability improvements
  {% endupdate %}

{% update date="2022-01-23" %}

## Version 8.1.3

**Fixed**:

* Crash in FMPLogger when SKAdNetwork’s \`startImpression\` failed
  {% endupdate %}

{% update date="2022-01-11" %}

## Version 8.1.2

**New**:

* Added support for (Open Measurement) OMSDK v1.3.26
* Minimum Xcode version supported: 12.5.1

**Improvement**:

* Performance and stability issues
  {% endupdate %}

{% update date="2021-11-14" %}

## Version 8.1.1

**Fixed:**

* Build failed when built with Xcode 12 and ENABLE\_BITCODE = YES
  {% endupdate %}

{% update date="2021-11-03" %}

## Version 8.1.0

**New**:

* Added support for (Open Measurement) OMSDK v1.3.25

**Improvements**:

* Minor bug fixes
  {% endupdate %}

{% update date="2021-10-19" %}

## Version 8.0.0

**New**:

* Added support for SDK Bidding

**API**:

* All of the frameworks were unified into IASDKCore.xcframework
* IASDKVideo.xcframework and IASDKMRAID.xcframework are deprecated
* References to \<IASDKMRAID/IASDKMRAID.h> and \<IASDKVideo/IASDKVideo.h> should be removed

**Fixed**:

* Crash on FairBid in FMPAdapterAuctionParameters
* Crash in IAMRAIDViewController
* Minor bug fixes
  {% endupdate %}

{% update date="2021-09-22" %}

## Version 7.9.0

**Fixed**:

* Potential crash in 'IASDKCore' when there are multiple initialization calls
* Crash in the DV360 init process
  {% endupdate %}

{% update date="2021-09-13" %}

## Version 7.8.9

**Fixed**:

* Crash that might occur at the init phase
  {% endupdate %}

{% update date="2021-08-26" %}

## Version 7.8.8

**Improvements**:

* Added support for DV360 SCAR integration for full screen ads
* iOS 14.5 and SKAdNetwork 2.2 support - Xcode 12.4+ is not required anymore, 12+ required (contrary to version 7.8.5)
* Changed the SDK frameworks type from “.framework” to “.xcframework”.\
  When integrating manually: `“IASDKResources.bundle”` is now inside `‘IASDKCore.xcframework’` and should be taken from there.
  {% endupdate %}

{% update date="2021-08-03" %}

## Version 7.8.7

**Fixed**:

* Crash in iOS 14.7 when using SKAdNetwork 2.2
  {% endupdate %}

{% update date="2021-06-07" %}

## Version 7.8.6

**Fixed**:

* Crash in SKAdNetwork version 2.2 when the application is running on iOS 14.5.0 and the store product is in an unsupported region
* Crash occurring in cases where the application uses an AdMob version below 7.64.0 with Fyber Marketplace SDK version 7.8.3. This is regardless of whether AdMob is the mediated network or part of the application's mediated SDK.
  {% endupdate %}

{% update date="2021-05-04" %}

## Version 7.8.5

**New**:

* iOS 14.5 and SKAdNetwork 2.2 support - **Xcode 12.5+ is required to use v7.8.5**

**Fixed**:

* Crash on application load- while using Unity in a specific scenario
* Crash during MoPub initialization

**Improvement**:

* Use of CallKit API has been removed
  {% endupdate %}

{% update date="2021-04-12" %}

## Version 7.8.3

**New**:

* Added support for DV360 SCAR integration for banners
* Deprecated VPAID video support
* **Minimum supported iOS version is v.10.0**

**Fixed**:

* Crash in IAXMLContentNetworkBuilder for a specific scenario
* Critical issue where apps get stuck under Unity for video ads

{% hint style="info" %}
A crash occurs in cases where the application uses an AdMob version below 7.64.0 with Fyber Marketplace SDK version 7.8.3. This is regardless of whether AdMob is the mediated network or part of the application's mediated SDK.
{% endhint %}

**iOS Adapters**:

* MoPub adapter support for version 5.16.1
  {% endupdate %}

{% update date="2021-03-11" %}

## Version 7.8.2

**New**:

* Added support for latest AdMob changes (v8.0.0)

**Improvements**:

* Video playback
* Removed usage of deprecated API in AdMob adapter

**Fixed**:

* Crash in ads fetching in a specific scenario
* Crash in RV in a specific scenario
* Bug with stuck interstitial in certain scenario
* Issue with double called callback of “modal dismissal”
* Minor rendering issues in certain scenarios
  {% endupdate %}

{% update date="2021-02-14" %}

## Version 7.8.1

**New**:

* Enhanced video skippability enforcement mechanism

**Fixed**:

* Crash in ads rendering in certain scenario
* Crash in multi-threaded dispose mechanism in certain scenarios
  {% endupdate %}

{% update date="2021-01-19" %}

## Version 7.8.0

**New**:

* Added additional Contextual parameters and improved the infrastructure
* Enhanced user experience and positioned video within the safe-area bounds
* Changed default web-view background color to black
* Removed “Open in Safari” button from in-app browser
* Added support for Mopub 5.15

**Fixed**:

* Crash in a certain scenario related to content rendering
* Mem-leak in a certain scenario related to end-cards
* Bug related to keywindow
* Issue with mute button in rewarded video
* Issue with non-skippable ads in a certain scenario
* Issue with video ads that might get stuck due to multiple clicks on the end card
* Issue with accessing UI from the background thread
* Issue with lost first ad request in Mopub mediation
  {% endupdate %}

{% update date="2020-11-10" %}

## Version 7.7.3

**New**:

* Improved low ad quality detection and prevention mechanisms in all fullscreen ads
* Improved HTML ad centering in specific ads

**Fixed:**

* Crash in rare scenario in VAST ads
* Missing Close button in certain scenarios of Rewarded Playables
* Potential import conflict in MoPub mediation
  {% endupdate %}

{% update date="2020-10-15" %}

## Version 7.7.2

**New**:

* Increased the size of iPad video controls by 20%
* Removed the automatic dismissal of interstitials

**Fixed**:

* Crash in rare scenarios in rewarded videos under AdMob mediation
* Orientation issue in interstitial display ads
* Improved spinner logic while opening app store in certain scenarios
  {% endupdate %}

{% update date="2020-10-04" %}

## Version 7.7.1

**Updates**:

* Added support for **iOS 14** and **Xcode 12**. Please note, Xcode 11.7 and below are not supported
* Added **SKAdNetwork 2.0** support
* Added new privacy-aware **contextual** **data** parameters
* Added additional VAST functionality that improves click tracking and helps mitigate accidental clicks
* Added support for **dark** mode in in-app browser
* User interface updates targeting increased user engagement (Video CTA now lists “Install Now” instead of “Visit Us” )

**Fixed**:

* Fixed minor bug in banners refresh
* Increased the close button size and touch area in static end-cards
  {% endupdate %}

{% update date="2020-09-03" %}

## Version 7.6.4

**Fixed**:

* Crash in a rare scenario under MAX mediation
  {% endupdate %}

{% update date="2020-08-13" %}

## Version 7.6.3

**Features**:

* Added support for collecting IDFV.

{% hint style="info" %}
**Note**: IDFV is a critical signal for the preparations for iOS 14. The availability of IDFV for buyers will assist in maximizing spend on IDFA-less traffic.
{% endhint %}

* Added a new API for passing Developer User ID

**Fixed**:

* Performance and stability improvements
  {% endupdate %}

{% update date="2020-08-02" %}

## Version 7.6.2

**Fixed**:

* Bug related to missing bundle resources (buttons) in the Unity 2019 integration
* Performance and stability
  {% endupdate %}

{% update date="2020-07-22" %}

## Version 7.6.1

**Updates**:

* Added support for MoPub 5.13.1
* Defined new end-card minimum size requirement to be 100x100 pixels (previously 300x250 pixels)

**Fixed**:

* Improved stability and performance
  {% endupdate %}

{% update date="2020-07-12" %}

## Version 7.6.0

**Updates**:

* New ad format! Added support for Rewarded Playables, which are configured under the existing Rewarded Placement Type
  * Added a new rewarded completion callback for interstitial unit controllers.
* Improved click handling for interstitial display Ad Units
* Added new API - SDK Init completion callback.
* Added new API `isReady`
* Improved the SDK handling of VAST CompanionAd file extension and mime-types, such as case-insensitive “JPG”
* Improved the look and feel of the fail-safe close button
* Added reward callback implementation to the Admob adapter
* Added support for Fyber's new init API in under Mopub's adapter
* Added support to retrieve GDPR consent status directly from Mopub’s SDK if the app uses Mopub mediation
* Updated Mopub adapters to support Mopub 5.12.1

**Fixed**:

* Fixed ad-refresh which was stuck in a certain scenario
* Fixed a crash in a certain rare scenario while opening the StoreKit
* Fixed a crash in a certain rare scenario when showing the in-app browser
* Fixed a bug with a disappearing close button in the CompanionAd
* Fixed a bug with missing close button when rotating the device in a certain rare scenario
* Fixed a bug involving a playable ad playing in the background
* Improved handling of universal link stability. In rare cases users would see a stuck spinner
* Removed false-positive "page is not available" label from the in-app browser
* Removed MOAT and Avid frameworks from the MoPub adapter dependencies in the Cocoapods integration
* Stability and performance improvements
  {% endupdate %}

{% update date="2020-06-01" %}

## Version 7.5.6

**Fixed**:

* Critical bug that caused the SDK to consider secure app-store links as non-secure.
  {% endupdate %}

{% update date="2020-05-20" %}

## Version 7.5.5

**Updates**:

* Improved the SDK initialization process - lower latency

**Fixed**:

* Crash occurring in a specific version of Unity during SDK initialization process
* Incorrect User-Agent in VAST End Cards on new iPads
  {% endupdate %}

{% update date="2020-03-12" %}

## Version 7.5.4

**Updates**:

* Improved UI/UX in video behavior by removing redundant “play” button
* Improved UI/UX for the location of the “close” button in iPhone X and above
* Improved full-screen video countdown timer logic
* Improved visual display on banners by adding support for content aware backgrounds
* Improved memory management in VPAID ads
  {% endupdate %}

{% update date="2020-02-18" %}

## Version 7.5.3

**Fixed**:

* Crash in networking module in certain rare scenario
* Crash in click-handling module which could occur in certain rare scenarios
* The `willDismissFullscreen` callback which was not called when the internal browser was closed
* Bug when using the Smartlink feature, the SDK opens the internal browser instead of the external browser
  {% endupdate %}

{% update date="2020-02-12" %}

## Version 7.5.2

**Updates**:

* muteAudio API - Allows publishers to start a fullscreen video interstitial muted, in cases where the user has muted the app’s music/sound
* Support added for CompanionClickTracking
* Support added for the latest AdMob Mediation version (7.53.1)
* Ad experience UI update: All 'X' (close) buttons on interstitial ads use the same theme
* When the user closes the landing page / app store of an interstitial display ad the SDK dismisses the ad

**Fixed**:

* Issue in MoPub adapter which tries to show an interstitial / rewarded ad while there is another one being presented
* Bug in VPAID with the ‘X’ button which is shown immediately on the endcard (appears after 3 seconds)
* Bug in iOS 11 when clicking the ‘Visit us’ button only the 1st click responds
* A potential UI flow on a background thread in certain cases in video flow
* Bug - audio continues to play when display (MRAID and Video) ad is closed
* Background refresh in banner while mediated using MoPub
* Banner refreshes when returning from background
* Removed redundants logs in AdMob adapter
* Improved error log upon a wrong appID and/or missing SDK config
  {% endupdate %}

{% update date="2020-01-14" %}

## Version 7.5.1

**Updates**:

* Added CCPA (us\_privacy) string API
* Added a new API (callback) for ad impression level revenue data
* Added a new API (protocol) `IAGlobalAdDelegate` which contains the required callback for impression data
* Added support for MRAID force orientation
* Updated Mopub adapters to support Mopub 5.10.0 - Decreased the Mopub banners adapter timeout from 15 to 9 seconds. It is defined as Mopub's defined macro for banners timeout (which is 10 seconds) minus 1 second: \`BANNER\_TIMEOUT\_INTERVAL - 1'
* Updated AdMob adapters to support remote credentials, which could be defined in the AdMob console

**Fixed**:

* Fixed a bug in VPAID which blocked VPAID ads from being rendered on iPads
* Fixed a timeout issue which in case the timeout is not set explicitly, the ad fetch will always fail
* Fixed a bug where the in-app browser was opened upon the 204 response upon the ad click
* Fixed a minor MRAID sizing bug
* Stability and performance improvements

**Deprecated**:

* Removed the support of the MRAID Picture and Calendar, which removes a requirement in the `info.plist` permission.

{% hint style="info" %}
Note: there still can be a `webcal://` link in a creative, which is a standard iOS URL scheme, but it does not require a permission.
{% endhint %}
{% endupdate %}

{% update date="2019-12-09" %}

## Version 7.5.0

**Updates**:

* Restored the StoreKit usage in iOS 13 and above
* Added support for dynamic web styling for AB-testing, to test and improve HTML rendering
* SDK will detect a problematic ATS configuration and adjust the ad request accordingly

**Fixed**:

* Fixed inconsistency with User Agents
* Fixed a crash which could occur in a certain edge case
* Improved internal browser behavior
* Improved HTML rendering in certain cases
* Improved SDK stability and performance
  {% endupdate %}

{% update date="2019-11-20" %}

## Version 7.4.2

**Updates**:

* The minimum supported iOS version is now iOS 9
* Improved overall stability
* Improved the creatives rendering

**Fixed**:

* Analytics issues in secure connections
* Crash, caused by a specific type of URI for an external app

**Deprecated**:

* Removed the `Automatic Location Update Engine`, which required the sensitive location permissions to be added to the info.plist of the publisher application.
* Removed the Native Ads module, including the `MoPub Native Ads Mediation Adapter`
  {% endupdate %}

{% update date="2019-09-25" %}

## Version 7.4.1

**Updates**:

* iOS 13 Support: Deprecate all usage of UIWebView API from the SDK

**Fixed**:

* Minor UI issues
  {% endupdate %}

{% update date="2019-09-01" %}

## Version 7.4.0

**Updates**:

* iOS 13 Support: Sets the full-screen presentation mode for the full-screen view controllers (due to the changes in iOS 13 default behavior).

**Fixed**:

* Bug with overlapped x-button in certain edge cases, which caused interstitial ads to remain on the screen without the ability to dismiss them
  {% endupdate %}

{% update date="2019-08-01" %}

## Version 7.3.3

**Updates**:

* Support for Smartlink+: A deep linking scheme allowing advertisers to provide a fallback URL in case the destination of the deep link cannot be found on the device. This scheme also allows the attachment of appropriate click trackers to both the primary URL and the fallback URL.
* Support for native browser scheme: A new option for the advertisers to notify Fyber SDK that the click URL should be opened in the native browser of the device and not in the SDKs’ built-in browser. This is an additional option to the already existing method of using URL suffix
* Update the text of the CTA button in the video player to "download" when the link leads directly to the App Store

**Fixed**:

* Click tracking bug in the Mopub adapter (V 5.5.0 and above)
* Miscellaneous bug fixes and improvements
  {% endupdate %}

{% update date="2019-08-01" %}

## Version 7.3.2

**Fixed**

* Issue where sometimes the VAST completion was sent when it should not have been sent
  {% endupdate %}

{% update date="2019-07-01" %}

## Version 7.3.1

**Updates**

* New GDPR consent string API
* Improved handling of the URL Schemes
* Fixed skip logic for video of less than 15s

**Fixed**

* Improved stability and performance

**Adapters**

* Mopub Adapter 5.5/5.6 supports a dynamic init (and re-init) of the Marketplace SDK, based on the remote Mopub's console JSON data (appID)
  {% endupdate %}

{% update date="2019-06-01" %}

## Version 7.3.0

**Updates**

Video (VAST) end-card experience and design

* Default end card new design and experience
* "Replay" button removed from Fyber Marketplace default end card

Video (VAST) end card optimizations

* Showing end card when video is stuck and cannot be completed
* End card selection optimization
* Always show end card after ad skip
* Show Fyber default end-card if there is no ad end card

Playable Ads

* Playable ads certification on SDK

**Fixed**

* Several rendering issues in Display Ads
* Improved stability and performance
  {% endupdate %}

{% update date="2019-04-01" %}

## Version 7.2.3

**Updates**

* MoPub adapter update for MoPub SDK v5.5 and above.
  {% endupdate %}

{% update date="2019-01-01" %}

## Version 7.2.1

**Updates**

* Support MRAID end-cards for video Interstitial ad
* Support uniform Skippability: For video interstitials, any video that is 15s or shorter will be non-skippable. Videos 16s or longer will be skippable usually after 5s
* Extended support for MRAID video in Interstitial Display ad
  {% endupdate %}

{% update date="2018-10-01" %}

## Version 7.1.1

**Updates**

* End card now filters out erroneous creatives and improves user experience

**Fixed**

* Gif animation bug fix in end cards
* Video is paused when rotate device to landscape
* Video is paused when closing the browser after visiting the advertiser's page
* Infrastructure fixes required to maintain a stable service
  {% endupdate %}

{% update date="2018-09-01" %}

## Version 7.1.0

**Updates**

* Added full support for iOS 12
* VPAID tag updated to version 3.0.2

**Fixed**

* Fixed issues in End card rendering
  {% endupdate %}
  {% endupdates %}


# SDK Changelogs


# Additional Resources


# Ad Types and Specification

A Placement is a location within your app where ads can be displayed. This may be when you open the app, between levels of a game, or within your app's feed. An ad unit is the type of ad that is served in that location.

Each placement accommodates one ad type. You must integrate at least one placement to begin showing ads from DT Exchange buyers.

<div align="left" data-with-frame="true"><img src="/files/jFhGYwJ2ltVOV0ksfTaU" alt=""></div>

## Key Terms <a href="#h_01hfmpjmxydjga1w41hk99dmvm" id="h_01hfmpjmxydjga1w41hk99dmvm"></a>

* **Full Screen**. The ad unit is presented in a modal view controller that occupies the entire screen and does not allow the user to interact with content lying underneath the ad. In-View ads can transition into full screen ads and back.
* **In-Feed**. The ad unit (regular or native) occupies one of the cells in a table or collection view.
* **In-View**. The ad is presented as a subview to a `UIView` class instance provided by the publisher. When clicked, an ad may transition to the following presentations:
  * In-app browser like DT Web Browser.
  * In-app storekit view controller.
  * Trigger the `Expand` MRAID command and transform to full-screen modal.
* **Modal**. View controller that overlays app content. Users cannot interact with app content lying underneath a modal until the modal is closed. For more information, see Apple's [Human Interface Guidelines](https://developer.apple.com/ios/human-interface-guidelines/app-architecture/modality/).
* **Regular**. The ad supports HTML/MRAID 2.0 content, video content, or both. The ad is not Native.
* **Video**. In the context of DT Exchange, this is VAST 2.0 content.

## Banner <a href="#h_01hfmpjmxxb0cw5qq0dc411mrq" id="h_01hfmpjmxxb0cw5qq0dc411mrq"></a>

A static or animated image or media usually placed in high‑visibility areas at the top or bottom of the screen. The following table provides a summary of banner ad specifications and behaviors.

* **Size**: 320x50, 728x90 for tablets
* **Behavior**: The ad remains on screen, within the app’s layout, while the user is interacting with an app.
* **Close Logic:** No **Close** button is available for Banner ads. The user cannot close the ad.
* **Supported Ad Content**: HTML/MRAID 2.0
* **Ad Placement Type**: In-View

## MREC

A Medium Rectangle (MREC) ad is always 300x250 and is a highly prominent ad unit, typically receiving higher than average click‑through rates. It is generally the best-performing ad size. The following table provides a summary of MREC ad specifications and behaviors.

* **Size**: 300x250
* **Behavior**: MREC ads are commonly placed at the bottom of the screen before the user scrolls down.
* **Close Logic:** No **Close** button is available for MREC ads. The user cannot close the ad.
* **Supported Ad Content**: HTML/MRAID 2.0
* **Ad Placement Type**: In-View

## Interstitial Display

Interstitial Display ads are full‑screen display ads that appear between app content and are placed at natural transition points or breaks, such as in between activities or game levels. The full-screen coverage differentiates them from other ad types, such as banner ads. The following table provides a summary of Interstitial Display ad specifications and behaviors.

* **Size**: Full Screen
* **Close Logic:** A **Close** button (iOS) or **Back** button (Android) appears after a 5-second delay.
* **Supported Ad Content**: HTML/MRAID 2.0, VAST 2.0
* **Ad Placement Type**: Full Screen Modal

## Interstitial Video

Interstitial Video ads are full‑screen video ads that appear between app content and are placed at natural transition points or breaks, such as in between activities or game levels.An in-app full-screen video. The following table provides a summary of Interstitial Video ad specifications and behaviors.

* **Size**: Full Screen
* **Aspect Ratio**: Though the SDK provides videos with any aspect ratio, DT recommends the following video aspect ratios:
  * 16:9 (for phones and tablets)
  * 4:3 (for tablets)
  * 3:2
  * 16:10
* **Duration**: 15-30 seconds
* **Countdown Timer**: Videos play with a countdown timer at the bottom left of the video based on the video duration passed in VAST XML.
* **Call to Action**: A Call-to-Action (CTA) button is presented when the app store is detected as the landing page. When the user clicks the CTA button during video playback, they are taken to the DSP landing page (app store, in-app browser, deep link). Once the landing page is closed, the video resumes playing.
* **Skip Logic**: Interstitial videos that are 15 seconds or shorter are not skippable, and no **Skip** button is shown. Videos that are 16 seconds or longer are skippable after a 5‑second delay using a **Skip** button presented in the upper right-hand corner.
* **End Card**: An end card is always shown after a user completes or skips the video. A **Close** button appears on the top right-hand corner after a 3-second delay.
* **Orientation**: DT does not have any orientation restrictions and abides by app and device settings.
* **Sound**: The sound icon appears immediately in the upper left corner and is always available for the user to toggle the video sound on or off. DT always supports the device's sound setting. If the device is set to mute, the ad plays with sound off. If the device is not set to mute, the ad plays with sound on.\
  With DT Exchange Android SDK version 7.4.0 and DT Exchange iOS SDK version 7.5.2, DT allows publishers to override sound settings per user session according to the user's device settings within the app.
* **Supported Ad Content**: HTML/MRAID 2.0, VAST 2.0
* **Ad Placement Type**: Full Screen Modal

## Rewarded Video

Ads where the user can opt in to watch a video in exchange for an incentive, such as an extra life in a game, an extended free trial, or virtual in-app currency. The following table provides a summary of Rewarded Video ad specifications and behaviors.

* **Size**: Full Screen
* **Duration**: 30 seconds maximum
* **Countdown Timer**: A countdown timer immediately appears at the bottom left of the video based on the video duration passed in VAST XML.
* **Skip Logic**: No skip button is presented. Users cannot skip rewarded videos.
* **End Card**: The DT SDK always presents an end card upon video close or completion. The **Close** button appears on the top right-hand corner after a 3-second delay.
* **Orientation**: DT does not have any orientation restrictions and abides by app and device settings.
* **Supported Ad Content**: HTML/MRAID 2.0, VAST 2.0
* **Ad Placement Type**: Full Screen Modal

## Rewarded Playable

Interactive ads that give users a preview of an app so they can try out the app before downloading. Users opt in to interact with the ad in exchange for an incentive in the app, such as an extra life or free tokens. The following table provides a summary of Rewarded Playable ad specifications and behaviors.

* **Size**: Full Screen
* **Duration**: 30 seconds maximum
* **Close Logic**: The DSP uses `MRAID.useCustomClose()` to present their own close button in less than 30 seconds. To ensure users are able to close all ads, the DT SDK adds a fail-safe **Close** button after a 30‑second delay when `MRAID.useCustomClose()` is detected.
* **Countdown Timer**: A countdown timer is not available.
* **Supported Ad Content**: HTML/MRAID 2.0, VAST 2.0
* **Ad Placement Type**: Full Screen Modal


# User Management

The DT User Management tool allows different personas to have access to specific areas of the dashboard and perform various functions. This ensures each team member has the appropriate permissions for their responsibilities.

## Roles and Permissions <a href="#h_01jvvmgaabes1nndd34rvk2j4g" id="h_01jvvmgaabes1nndd34rvk2j4g"></a>

You can choose between four different roles in the system, each with its own unique set of permissions:

* Administrator
* Manager
* Developer
* Finance

The following table describes the permissions available to each role:

| **Permission / Role**                |        **Administrator**        |           **Manager**           |          **Developer**          |           **Finance**           |
| ------------------------------------ | :-----------------------------: | :-----------------------------: | :-----------------------------: | :-----------------------------: |
| Create and Edit Apps                 | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> | <i class="fa-xmark">:xmark:</i> |
| Create and Edit Placements/Instances | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> | <i class="fa-xmark">:xmark:</i> |
| View Apps/Placements/Instances       | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> | <i class="fa-xmark">:xmark:</i> |
| Use Dynamic Reports                  | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> | <i class="fa-xmark">:xmark:</i> | <i class="fa-check">:check:</i> |
| View Reporting API Keys              | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> | <i class="fa-xmark">:xmark:</i> | <i class="fa-check">:check:</i> |
| View Management API Keys             | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> | <i class="fa-xmark">:xmark:</i> | <i class="fa-xmark">:xmark:</i> |
| View and Edit Blocking List          | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> | <i class="fa-xmark">:xmark:</i> | <i class="fa-xmark">:xmark:</i> |
| View and Edit DT Exchange Settings   | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> | <i class="fa-xmark">:xmark:</i> | <i class="fa-xmark">:xmark:</i> |
| Invite/Edit Users                    | <i class="fa-check">:check:</i> | <i class="fa-xmark">:xmark:</i> | <i class="fa-xmark">:xmark:</i> | <i class="fa-xmark">:xmark:</i> |
| View and Edit Payment Details        | <i class="fa-check">:check:</i> | <i class="fa-xmark">:xmark:</i> | <i class="fa-xmark">:xmark:</i> | <i class="fa-check">:check:</i> |

## User Management <a href="#h_01jvvg57ch4y91nbnpvsakgjh1" id="h_01jvvg57ch4y91nbnpvsakgjh1"></a>

The User Management window lists all team members and their specific roles, as well as additional details for those users with a developer role, the publishers, and the apps they have permission to access. Enter text in the search field to search for a specific team member or a particular role.

<div align="left" data-with-frame="true"><img src="/spaces/4IftQ9WUOy9feTA5sZeE/files/zQ08w1z52GZQ6MapgzSX" alt=""></div>

### Adding Users and Assigning Roles <a href="#h_01jvvc39dmbgxefntn1743v5by" id="h_01jvvc39dmbgxefntn1743v5by"></a>

To add a new user and assign a role:

1. In the DT Console, click **User Management**.\
   The **User Management** window appears.

<div align="left" data-with-frame="true"><img src="/spaces/4IftQ9WUOy9feTA5sZeE/files/lbUW0S9vqN552Ln5a812" alt=""></div>

2. Click **Invite New User**.\
   The **Invite new user** window opens.
3. Enter the **Full Name** and **E-mail** of the new user in the required fields.
4. To assign the role, click the **Role** dropdown list and select the required role.
5. Click **Send Invite**.\
   The new user receives an activation email with a link to activate their account. After activation, the user can access dashboard features according to the assigned role.


# Reporting


# Dynamic Reporting

Digital Turbine handles over 15 billion events a day, producing some 3000 TB (approximately a trillion bytes) of data each month. Every event contains more than 80 attributes describing the advertisement request and response flow. Digital Turbine's Dynamic Reports module provides DT publishers with the ability to create and view reports revealing close to real-time data ingestion, flexible data exploration, and fast data aggregation.

<div data-with-frame="true"><figure><img src="/files/NeBngDxE2bkCArTHJS20" alt=""><figcaption></figcaption></figure></div>

## The Report

The [Auctions Report](/dt-console/reports/auctions) is a dynamic report that allows you to get a deeper look into the auction landscape and relies on specific data and dimensions.

***


# Reporting API

{% content-ref url="/pages/pGl1frCBgieSaHWEcwSG" %}
[DT Exchange Reporting API](/dt-exchange/reporting/reporting-api/dt-exchange-reporting-api)
{% endcontent-ref %}

{% content-ref url="/pages/2MRbx2026dUiz3LGIsE5" %}
[Basic Reporting API](/dt-exchange/reporting/reporting-api/basic-reporting-api)
{% endcontent-ref %}

{% content-ref url="/pages/rOG1WBhvYlt37bZYm4du" %}
[User Level Reporting API](/dt-exchange/reporting/reporting-api/user-level-reporting-api)
{% endcontent-ref %}


# DT Exchange Reporting API

The DT Exchange Reporting API enables you to access all the reporting data from the monetization ad units. You can query multiple metrics, such as revenue and impressions, across the available dimensions and even implement filters.

## Reporting API Workflow <a href="#section-reporting-api-workflow" id="section-reporting-api-workflow"></a>

The publisher makes a POST request using the Client ID and Client Secret to receive the Access Token, as described in [Step 1](#h_01gkp00mcq3d07d53wc3608hfg).

Once the request is successful, and the Access Token is received, an API Request is made to create a custom report as described in [Step 2](#section-step-2-reporting-api-request). A successful response will contain a URL leading to a file that will be populated with the custom report. More details can be found in [Step 3](#section-step-3-receiving-the-custom-report).

## Step 1: Obtaining the Access Token <a href="#h_01gkp00mcq3d07d53wc3608hfg" id="h_01gkp00mcq3d07d53wc3608hfg"></a>

DTs Reporting API uses Access Tokens for authentication purposes. To obtain your Access Token, you must first get your Client ID and Client Secret.

The base End Point for the entire process is: `https://reporting.fyber.com`

#### Authentication Token <a href="#h_01gkp01247yz7swwfhjxtnwwg3" id="h_01gkp01247yz7swwfhjxtnwwg3"></a>

```
POST /auth/v1/token
```

#### Headers <a href="#h_01hrsm6vapbyc9stbyxfte019c" id="h_01hrsm6vapbyc9stbyxfte019c"></a>

```
Content-Type    application/json
```

#### Sample Request <a href="#h_01hrsm6vapfmygqzyvd1591qd3" id="h_01hrsm6vapfmygqzyvd1591qd3"></a>

```html
https://reporting.fyber.com/auth/v1/token
```

#### Params <a href="#h_01hrsm6vapjh0jfhkmd2htp1db" id="h_01hrsm6vapjh0jfhkmd2htp1db"></a>

```
format  csv
```

#### Body: raw (application/json) <a href="#h_01hrsm6vaq432b3mr2b5dtt8n8" id="h_01hrsm6vaq432b3mr2b5dtt8n8"></a>

{% code title="JSON" %}

```json
{
    "grant_type": "client_credentials",
    "client_id": "3ce66d885XXXXXXXXXXa3b752bb9058",
    "client_secret": "YtMvC7VYTQMQ7w9UCUaFXXXJnwVZnQqqN02XNyt8IIh2h8XFDuXXXXXXXXSS6XTrFWW4TkebCcMLJkrXSw5IurkearTJIDzUxsbiMXv8hb4T23MwN6eE7DDIthRFqDnhnuhiDlY2oPeaOjsMbzE8joZ5cs6tsySJz6uZXwJ-x3lcYaYbgXXXXXXXX3_hFeuXm-C7-me2V1MMs-ftJxTd5QbHoUhG3Q5anCWCW_pg8x3CL4yPGCbpWUDZfpdNPyyCT4rxCEb-VC0Bdqwe8N2GGn_VSFOwQYxa-yap2JuNSGJfl_ZURXXXXXXXXFe1GpHDn8pk7yYwQYIGAg"
}
```

{% endcode %}

{% hint style="info" %}
Note the following:

* **Grant Type** must be `client_credentials`.
* The credentials are sent according to the OAuth 2.0 protocol.
  {% endhint %}

### Sample Authentication Response <a href="#h_01hrsm6vaqmf70nkym897agmhb" id="h_01hrsm6vaqmf70nkym897agmhb"></a>

When an authentication request is successful, you receive the following response in JSON format:

#### Successful Response <a href="#h_01hrsm6vaq0jjfaaw90871hh3c" id="h_01hrsm6vaq0jjfaaw90871hh3c"></a>

{% code title="JSON" overflow="wrap" %}

```json
{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXXXJ9.eyJpYXQiOjE1NzAwMTY5MDAsImV4cCI6MTU3MDAyMDUwMCwiYXVkIjoic3BlZWRiYWxsIiwic3ViIjoiMjEwMjYzIn0.hDo1waTytSys_oRhFNUPqZPom26bL05rxgtSt3XYHqI",
  "tokenType": "bearer",
  "expiresIn": 3600
}
```

{% endcode %}

**accessToken**: The token required to continue the process\
**tokenType**: Bearer\
**expiresIn**: 3600 seconds (1 hour)

| Parameter     | Description                                |
| ------------- | ------------------------------------------ |
| `accessToken` | The token required to continue the process |
| `tokenType`   | Bearer                                     |
| `expiresIn`   | 3600 seconds (1 hour)                      |

#### Unsuccessful Response

When a request is unsuccessful, you receive the following response:

{% code title="JSON" overflow="wrap" %}

```json
{
  "error": "internal_server_error"
} 
```

{% endcode %}

### Possible Authentication Errors <a href="#section-possible-authentication-errors" id="section-possible-authentication-errors"></a>

Set out in the table is a list of possible errors which resulted in an unsuccessful response.

| HTTP Status Code | Error                    | Scenario                                                                                                                                                               |
| ---------------- | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `400`            | `unsupported_grant_type` | N/A                                                                                                                                                                    |
| `400`            | `invalid_request`        | When there are missing credentials                                                                                                                                     |
| `400`            | `invalid_client`         | <p>When the credentials are incorrect or cannot be recognized.<br>Can also occur when your account has been disabled or when the credentials<br>have been revoked.</p> |
| `500`            | `internal_server_error`  | Unexpected errors in DT's servers                                                                                                                                      |

## Step 2: Reporting API Request <a href="#section-step-2-reporting-api-request" id="section-step-2-reporting-api-request"></a>

Use the access token you received in [Step 1](#h_01gkp00mcq3d07d53wc3608hfg) to request your custom report.

The request is made up of five individual sections:

* Source
* Date Range
* Metrics
* Splits
* Filters (include)

### Request Example <a href="#h_01hrsm6vaqnf6kjctevp2j2285" id="h_01hrsm6vaqnf6kjctevp2j2285"></a>

Set out below is a request example

**Source**

Below is an example from the Demand Performance report. Therefore, the source is "mediation".

* The Source must be in lowercase.

**Date Range**

Start date: 2019-01-06\
End date: 2019-09-25

**Metrics**

* Bid Requests
* Bid Responses
* Impressions
* Clicks
* Rewarded Completions
* Revenue (USD)

**Splits (dimensions)**

* Fyber App ID

**Filters**

* Dimension filtered is the country
* Values filtered are US, CA and RU

For further descriptions about the terms used in this article, see [Using the Reports](/dt-console/reports/using-the-reports).

#### URL <a href="#h_01hrsm6vaqv1r33fqjfgnht9rs" id="h_01hrsm6vaqv1r33fqjfgnht9rs"></a>

```json
https://reporting.fyber.com/api/v1/report?format=csv
```

#### Headers <a href="#h_01hrsm6vaq9mste8njacpjgr48" id="h_01hrsm6vaq9mste8njacpjgr48"></a>

```json
Content-Type:   application/json
Authorization: Bearer <Access Token from Authentication Response>
```

#### Params <a href="#h_01hrsm6vaqmpf8kd8xntq8597q" id="h_01hrsm6vaqmpf8kd8xntq8597q"></a>

```json
format  csv
```

#### Body. raw (application/json) <a href="#h_01hrsm6vaqp8nax5036wsk3wf6" id="h_01hrsm6vaqp8nax5036wsk3wf6"></a>

{% code title="JSON" %}

```json
{
    "source": "mediation",
    "dateRange": {
        "start": "2019-07-01",
        "end": "2019-09-25"
    },
    "metrics": [
        "Bid Requests",
        "Bid Responses",
        "Impressions",
        "Clicks",
        "Rewarded Completions",
        "Revenue (USD)"
    ],
    "splits": [
        "Fyber App ID"
    ],
    "filters": [
        {
            "dimension": "Country",
            "values": [
              "US",
              "CA",
              "RU"
            ]
        }
    ]
}
```

{% endcode %}

If no `splits` or `filters` are required, their value should be an empty array. However, `source`, `dateRange`, and `metrics` must include a value.

For example:

{% code title="JSON" %}

```json
{
    "source": "mediation",
    "dateRange": {
        "start": "2019-06-01",
        "end": "2019-09-25"
    },
    "metrics": [
        "Bid Requests"
    ],
    "splits": [],
    "filters": []
} 
```

{% endcode %}

### Responses <a href="#h_01hrsm6vaq8ngcrkpwfcmp74ct" id="h_01hrsm6vaq8ngcrkpwfcmp74ct"></a>

Set out below are examples of both successful and unsuccessful responses.

#### Successful Response

{% code title="JSON" %}

```json
{
  "id": "6fad42cb-25db-4af0-8988-1e7d8e6d90bc",
  "url": "https://fyber-async-reports.s3.amazonaws.com/group%3D210263/6fad42cb-25db-4af0-8988-1e7d8e6d90bc.csv?AWSAccessKeyId=AKIAQBQNZ5FY23OTK4UD&Expires=1570020564&Signature=LbhE5uljlPEKQRTbepDqmDgJuFQ%3D",
}
```

{% endcode %}

* The `id` field holds an identifier of the request for later troubleshooting, if required.
* The `url` field holds the URL to be polled (GET request) until the body response (file) is populated.

#### Unsuccessful Response <a href="#h_01hrsm6vaqdxbxa81xxnmkaamv" id="h_01hrsm6vaqdxbxa81xxnmkaamv"></a>

{% code title="JSON" %}

```json
{
  "error": "invalid_token"
}
```

{% endcode %}

#### Possible Errors <a href="#h_01hrsm6vaq57kjpv4wqh2y2r92" id="h_01hrsm6vaq57kjpv4wqh2y2r92"></a>

The table below shows the main errors indicating an unsuccessful response.

| HTTP Status Code | Error                   | Description (optional)                                                                                                                                                                                                                                                     | Scenario                                                                                                                                                                |
| ---------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 401              | invalid\_token          | N/A                                                                                                                                                                                                                                                                        | <p><em>Authorization header is empty</em><br>Authorization header not sent or token is not present in the header<br><em>Unrecognized token</em><br>Disabled account</p> |
| 400              | invalid\_format         | N/A                                                                                                                                                                                                                                                                        | Format is not supported - currently only csv format is supported                                                                                                        |
| 400              | invalid\_query          | <p>For example:<br>Invalid value undefined supplied to : Query/dateRange: DateRange<br><br>-or-<br><br>Invalid value "XXXXX" supplied to : Query/dateRange: DateRange/end: Date<br><br>-or-<br><br>Invalid dimensions: A,B,C<br><br>-or-<br><br>Invalid metrics: A,B,C</p> | <p><em>If the query sent is not in the expected schema</em><br>Date range is not sent in the ISO 8601 format<br><em>Invalid dimensions</em><br>Invalid metrics</p>      |
| 400              | invalid\_source         | Invalid source: XXXXX                                                                                                                                                                                                                                                      | Unsupported source type                                                                                                                                                 |
| 500              | internal\_server\_error | N/A                                                                                                                                                                                                                                                                        | Error in DT's servers                                                                                                                                                   |

## Step 3: Receiving the Custom Report <a href="#section-step-3-receiving-the-custom-report" id="section-step-3-receiving-the-custom-report"></a>

To obtain the Custom Report, follow the steps below:

1. Receive the URL from the successful response in [Step 2](#section-step-2-reporting-api-request).
2. Perform polling on the URL to access the file containing the custom report. The empty file is populated within one hour, depending on the size of the query.
3. If the file is not populated with data after one hour, resend the request.

The URL is valid for three hours.

## Additional Information and Restrictions <a href="#h_01hrsm6vaqp4tdnpwz9fbc5b76" id="h_01hrsm6vaqp4tdnpwz9fbc5b76"></a>

It is important to take note of all the information, restrictions and rules to ensure a successful response.

### General <a href="#h_01hrsm6vaqq7gbefk1bsffhk6f" id="h_01hrsm6vaqq7gbefk1bsffhk6f"></a>

* All reports are presented in US dollars
* The time zone used is UTC
* Data related to mediated networks is re-aggregated twice a day and updated for two weeks retroactively
* The Reporting APIs are available on a daily level, with a delay of up to 12 hours from the end of day UTC

### Query Restrictions <a href="#h_01hrsm6vaqn674j840wv7z6k8z" id="h_01hrsm6vaqn674j840wv7z6k8z"></a>

* All fields are mandatory. Splits and Filters can have an empty array. See example in [Step 2](#section-step-2-reporting-api-request).
* The time range for a report query is limited to 90 days
* Queries are limited to a maximum of 50 per day, per API
* You can query each one of the defined dimensions in the Reporting API calls by up to 7 dimensions in a single query
* You are restricted to 5 filters per query
* To receive a breakdown by date, it must exist in the "splits" array

### Date Range Restrictions <a href="#h_01hrsm6vaqbta3g7924b53j314" id="h_01hrsm6vaqbta3g7924b53j314"></a>

There are a number of rules that must be observed with regard to the date range:

* The start date and end date must be in the format of ISO 8601. For example, 2019-10-03
* The interval between the start and end date should not exceed 90 days
* The start date must be earlier or equal to the end date
* The start date must be no later than the previous 18 months
* The end date cannot be the current day's date or beyond it
* The start date and end date are included in the report

{% hint style="info" %}
Data for Mediation is available from 2022-11-07 onwards

Queries with the current day's date or dates prior to the above time periods result in an HTTP 400 status code (invalid\_query)
{% endhint %}

## Supported Metrics and Dimensions <a href="#h_01gkp0e0wnqf630fvgy12hdkrm" id="h_01gkp0e0wnqf630fvgy12hdkrm"></a>

You must specify in the API Request the source, metrics, dimensions, and optional filters you want to include in your custom report.

### Metrics <a href="#h_01hrsm6vaqyes2vm2cdkhpd0dg" id="h_01hrsm6vaqyes2vm2cdkhpd0dg"></a>

The following source mediation metrics are supported:

* Bid RequestsBid Responses
* Impressions
* Clicks
* Rewarded Completions
* Revenue (USD)
* Ad Requests

### Dimensions <a href="#h_01hrsm6vaqtemqeb9vb8fxxr1r" id="h_01hrsm6vaqtemqeb9vb8fxxr1r"></a>

The following source mediation dimensions are supported:

* Date
* App Name
* App Bundle
* Fyber App ID
* Placement ID
* Placement Name
* Placement Type: (Available values: Banner, Interstitial, Rewarded)
* Country
* Device OS: (Available values: iOS, Android)
* Demand Source Type Name: (Available values: Programmatic, Custom API)
* Demand Source Name
* Publisher ID

### Filters <a href="#h_01hrsm6vaqade6ygznpsp81xsh" id="h_01hrsm6vaqade6ygznpsp81xsh"></a>

You can set an include filter on any value(s) within a dimension. This means that all the data presented in the report relates only to the values defined in the filter.

For example:\
**Dimension** = Country\
**Filtered Value** = US or CA

As a result of these filters, the report will contain data relevant only for the countries US and CA.


# Basic Reporting API

This article relates to the DT Exchange Rest API. This API allows you to receive a breakdown of performance data by Apps, Placements and other dimensions.

## Authentication <a href="#authentication-0-0" id="authentication-0-0"></a>

Set out below are the details of how to obtain the required credentials for authentication for the DT Exchange Rest API.

### Obtaining OAuth Credentials <a href="#obtaining-oauth-credentials-0-1" id="obtaining-oauth-credentials-0-1"></a>

To secure your information, Digital Turbine uses the OAuth 1.0 authentication protocol and two-legged OAuth. Using two-legged OAuth, there is no need for an access token. Instead, just add the consumer key and consumer secret to your OAuth client and execute your request. For more information, click [here](http://oauth.net/core/1.0/).

### Obtaining the Reporting API Keys <a href="#obtaining-the-reporting-api-keys-0-2" id="obtaining-the-reporting-api-keys-0-2"></a>

To obtain the Publisher ID, Consumer Key and Consumer Secret:

1. Click the login details on the top-left of the screen and click **User Profile**.\
   The User Profile window appears.

<div align="left" data-with-frame="true"><img src="/files/pdIKrNcCASlKYKRqyw21" alt="" width="228"></div>

2. Copy the **Publisher ID**, **Consumer Key**, and **Consumer Secret** as needed.

<div align="left" data-with-frame="true"><img src="/files/nwbqd3FFFJZaAEJrXKLV" alt=""></div>

### Sample API Request <a href="#sample-api-request-0-3" id="sample-api-request-0-3"></a>

The following parameters must be included in the API Request.

| Parameter            | Description                                                                         |
| -------------------- | ----------------------------------------------------------------------------------- |
| publisherId          | Publisher ID from the Console                                                       |
| startDateEpoch       | Start date of the report in [epoch](https://www.unixtimestamp.com/index.php) format |
| endDateEpoch         | End date of the report in [epoch](https://www.unixtimestamp.com/index.php) format   |
| oauth\_consumer\_key | Consumer Key from the Console                                                       |
| oauth\_signature     | Computed OAuth 1.0 OAuth signature                                                  |

### Endpoint <a href="#enpoint-0-4" id="enpoint-0-4"></a>

```
https://revenuedesk.fyber.com/iamp/services/performance/{{publisherId}}/vamp/{{startDateEpoch}}/{{endDateEpoch}}?
```

### Required Headers <a href="#required-headers-0-5" id="required-headers-0-5"></a>

```
Content-type=application/json
Accept=application/json
```

### Response <a href="#response-0-6" id="response-0-6"></a>

The data returned is per Placement.

The response itself is first broken down to Apps and Placements, with the various response parameters.

A publisher can have a certain number of apps and each app with a different number of Placements.

The API Response is structured so that each parameter is placed under its parent. The top level information is the Publisher ID. Under the Publisher ID is App ID followed by the Placement ID for each App.

The 'Units' object contains all the requested parameters for each placement such as Country, Content Name, Clicks and CTR etc.

| Parameter          | Type            | Default | Description                                                 |
| ------------------ | --------------- | ------- | ----------------------------------------------------------- |
| spotId             | Number          | Null    | The ID of the Placement                                     |
| date               | Unix timestamp  | Null    | Representing a day in the date range                        |
| country            | 2-letter string | Null    | 2 letter country code                                       |
| publisherId        | Number          | Null    | Your DT Publisher ID                                        |
| applicationName    | String          | Null    | Human-readable app name as entered in the Create App form   |
| \[LEGACY]contentId | Number          | Null    | Numeric ID of the Ad Unit (aka Ad Unit ID)                  |
| contentName        | String          | Null    | The AppID from the Console                                  |
| distributorName    | String          | Null    | Platform like “iOS” or “Android”                            |
| contentCategories  | List            | Null    | List of category Name & ID                                  |
| adRequests         | Number          | Null    | Number of ad requests                                       |
| impressions        | Number          | Null    | Number of impressions                                       |
| fillRate           | Number          | Null    | The fill rate calculated by Impressions/AdRequests \* 100   |
| clicks             | Number          | Null    | Number of clicks                                            |
| ctr                | Number          | Null    | Click through rate – calculated by click/impressions \* 100 |
| ecpm               | Number          | Null    | Effective CPM Calculated by Revenue/Impressions \* 1000     |
| revenue            | Number          | Null    | Amount of revenue                                           |

The API returns the requested data, as follows:

{% code title="JSON" overflow="wrap" %}

```json
{
    "publisherId": 1,
    "apps": [
        {
            "appId": "1",
            "spots": [
                {
                    "spotId": "1",
                    "units": [
                        {
                            "date": 1500940800,
                            "country": "US",
                            "contentId": 1,
                            "spotId": "",
                            "contentName": "Content Name",
                            "applicationName": "Application Name",
                            "distributorName": "iPhone",
                            "contentCategories": [],
                            "adRequests": 2611,
                            "impressions": 1,
                            "fillRate": 0.00038299502106472615,
                            "clicks": 0,
                            "ctr": 0,
                            "ecpm": 0.7,
                            "revenue": 0.0007
                        }
                    ]
                },
                {
                    "spotId": "2",
                    "units": [
                        {
                            "date": 1500854400,
                            "country": "RU",
                            "contentId": 2,
                            "spotId": "",
                            "contentName": "Content Name 2",
                            "applicationName": "Application Name 2",
                            "distributorName": "iPhone",
                            "contentCategories": [],
                            "adRequests": 5,
                            "impressions": 0,
                            "fillRate": 0,
                            "clicks": 0,
                            "ctr": 0,
                            "ecpm": 0,
                            "revenue": 0
                        }
                    ]
                }
            ]
        }
    ]
}
```

{% endcode %}

<br>


# User Level Reporting API

The User Level Reporting API enables you to access reporting data to measure all revenue generated from individual users. This information can be used to optimize retargeting campaigns and accurately measure user lifetime value.

You can query revenue and impressions metrics across the available dimensions. For all supported metrics and dimensions for the User Level Reporting API, click the Metrics and Dimensions tab above.

{% hint style="info" %}
The User Level Reporting API is disabled by default for any new app onboarding. To enable it, contact your Account Manager. Once enabled, data is aggregated from six days prior to the activation date.
{% endhint %}

## Reporting API Workflow <a href="#reporting-api-workflow-0-1" id="reporting-api-workflow-0-1"></a>

The publisher makes a POST request using the Client ID and Client Secret to receive the Access Token, as described in [Step 1](#h_01g4hmkwpcr5rxh0tjm3ekt9cf).

Once the request is successful and the Access Token is received, an API Request is made to create a custom report as described in [Step 2](#h_01g4hmmgmv8hcpfj19m0wn6vvv).

A successful response will contain a URL leading to a file containing the custom report. More details can be found in [Step 3](#step-3-receiving-the-custom-report-0-21).

## Step 1: Obtaining the Access Token <a href="#h_01g4hmkwpcr5rxh0tjm3ekt9cf" id="h_01g4hmkwpcr5rxh0tjm3ekt9cf"></a>

Digital Turbine's Reporting API uses Access Tokens for authentication purposes. To obtain your Access Token, you must first get your Client ID and Client Secret.

Obtaining your Client ID and Client Secret

1. Sign in to the [DT Console](https://console.fyber.com/login).
2. On the top left side of the screen click your User ID

<div align="left" data-with-frame="true"><img src="/files/pdIKrNcCASlKYKRqyw21" alt="" width="228"></div>

3. Click User Profile to display the Reporting API Keys

<div align="left" data-with-frame="true"><img src="/files/7NG2ySlK8OBq7xZ6gsdw" alt=""></div>

4. If necessary, you can click **Revoke** to delete the current credentials.\
   You are returned to the API Keys window.

<div align="left" data-with-frame="true"><img src="/files/uWp4j4AeL9CSxFIXvUWy" alt="" width="505"></div>

5. Click **Generate New Keys** again, to receive new credentials.

{% hint style="info" %}
Keep your Client ID and Client Secret safe, as they can be reused in the future.
{% endhint %}

Using your Client ID and Client Secret make a POST request to receive your Access Token.

The base End Point for the entire process is: `https://reporting.fyber.com`

#### Authentication token <a href="#authentication-token-0-2" id="authentication-token-0-2"></a>

```
POST /auth/v1/token
```

#### Headers <a href="#headers-0-3" id="headers-0-3"></a>

```
Content-Type    application/json
```

#### Sample Request <a href="#sample-request-0-4" id="sample-request-0-4"></a>

```
https://reporting.fyber.com/auth/v1/token
```

#### Params <a href="#params-0-5" id="params-0-5"></a>

```
format  csv
```

#### Body: raw (application/json) <a href="#body-raw-application-json--0-6" id="body-raw-application-json--0-6"></a>

{% code title="JSON" %}

```json
{
    "grant_type": "client_credentials",
    "client_id": "3ce66d885XXXXXXXXXXa3b752bb9058",
    "client_secret": "YtMvC7VYTQMQ7w9UCUaFXXXJnwVZnQqqN02XNyt8IIh2h8XFDuXXXXXXXXSS6XTrFWW4TkebCcMLJkrXSw5IurkearTJIDzUxsbiMXv8hb4T23MwN6eE7DDIthRFqDnhnuhiDlY2oPeaOjsMbzE8joZ5cs6tsySJz6uZXwJ-x3lcYaYbgXXXXXXXX3_hFeuXm-C7-me2V1MMs-ftJxTd5QbHoUhG3Q5anCWCW_pg8x3CL4yPGCbpWUDZfpdNPyyCT4rxCEb-VC0Bdqwe8N2GGn_VSFOwQYxa-yap2JuNSGJfl_ZURXXXXXXXXFe1GpHDn8pk7yYwQYIGAg"
}
```

{% endcode %}

* **Grant Type** must be "client\_credentials"
* The credentials are sent according to the OAuth 2.0 protocol

### Sample Authentication Response <a href="#sample-authentication-response-0-7" id="sample-authentication-response-0-7"></a>

When an authentication request is successful, you receive the following response in JSON format:

#### Successful Response <a href="#successful-response-0-8" id="successful-response-0-8"></a>

{% code title="JSON" %}

```json
{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXXXJ9.eyJpYXQiOjE1NzAwMTY5MDAsImV4cCI6MTU3MDAyMDUwMCwiYXVkIjoic3BlZWRiYWxsIiwic3ViIjoiMjEwMjYzIn0.hDo1waTytSys_oRhFNUPqZPom26bL05rxgtSt3XYHqI",
  "tokenType": "bearer",
  "expiresIn": 3600
}
```

{% endcode %}

| Parameter     | Description                                |
| ------------- | ------------------------------------------ |
| `accessToken` | The token required to continue the process |
| `tokenType`   | Bearer                                     |
| `expiresIn`   | 3600 seconds (1 hour)                      |

When a request is unsuccessful, you receive the following response:

#### Unsuccessful Response <a href="#unsuccessful-response-0-9" id="unsuccessful-response-0-9"></a>

{% code title="JSON" %}

```json
{
  "error": "internal_server_error"
}
```

{% endcode %}

### Possible Authentication Errors <a href="#possible-authentication-errors-0-10" id="possible-authentication-errors-0-10"></a>

Set out in the table are a list of possible errors which resulted in an unsuccessful response.

| HTTP Status Code | Error                    | Scenario                                                                                                                                                               |
| ---------------- | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 400              | unsupported\_grant\_type | N/A                                                                                                                                                                    |
| 400              | invalid\_request         | When there are missing credentials                                                                                                                                     |
| 400              | invalid\_client          | <p>When the credentials are incorrect or cannot be recognized.<br>Can also occur when your account has been disabled or when the credentials<br>have been revoked.</p> |
| 500              | internal\_server\_error  | Unexpected errors in DT's servers                                                                                                                                      |

## Step 2: Reporting API Request <a href="#h_01g4hmmgmv8hcpfj19m0wn6vvv" id="h_01g4hmmgmv8hcpfj19m0wn6vvv"></a>

Use the access token you received in Step 1 to request your custom report.

The two dimensions that you can query in your request are:

* Date
* App ID

All other dimensions always appear in the report.

### Request Example <a href="#request-example-0-12" id="request-example-0-12"></a>

The below is an example from the User Level report.

#### Date <a href="#date-0-13" id="date-0-13"></a>

Date: 2020-16-02\
AppID: 123

For a full list of supported Metrics and Dimensions, see [User Level Metrics and Dimensions](#user-level-data-0-26).

For further descriptions about the terms used in this article, see [Using the Reports](/dt-console/reports/using-the-reports).

Make a POST request to receive your report.

#### URL <a href="#url-0-14" id="url-0-14"></a>

```
https://reporting.fyber.com/api/v1/report/user-level-data
```

#### Headers <a href="#headers-0-15" id="headers-0-15"></a>

```
Content-Type:   application/json
Authorization: Bearer <Access Token from Authentication Response>
```

#### Body. raw (application/json) <a href="#body-raw-application-json--0-16" id="body-raw-application-json--0-16"></a>

{% code title="JSON" %}

```json
{
    “date”: "2020-01-01",
    “appId”: “123"
}
```

{% endcode %}

### Responses <a href="#responses-0-17" id="responses-0-17"></a>

Set out below are examples of both successful and unsuccessful responses.

#### Response: Successful <a href="#response-successful-0-18" id="response-successful-0-18"></a>

{% code title="JSON" %}

```json
{
  "id": "6fad42cb-25db-4af0-8988-1e7d8e6d90bc",
  "url": "https://fyber-async-reports.s3.amazonaws.com/group%3D210263/6fad42cb-25db-4af0-8988-1e7d8e6d90bc.csv?AWSAccessKeyId=AKIAQBQNZ5FY23OTK4UD&Expires=1570020564&Signature=LbhE5uljlPEKQRTbepDqmDgJuFQ%3D",
}
```

{% endcode %}

* The "id" field holds an identifier of the request for later troubleshooting, if required.
* The "url" field holds the URL to be polled (GET request) until the body response (file) is populated.

#### Response: Unsuccessful <a href="#response-unsuccessful-0-19" id="response-unsuccessful-0-19"></a>

{% code title="JSON" %}

```json
{
  "error": "invalid_token"
}
```

{% endcode %}

### Possible Errors <a href="#possible-errors-0-20" id="possible-errors-0-20"></a>

The table below shows the main errors indicating an unsuccessful response.

| HTTP Status Code | Error                   | Description (optional)                                                                                                                                                              | Scenario                                                                                                                                                                |
| ---------------- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 401              | invalid\_token          | N/A                                                                                                                                                                                 | <p><em>Authorization header is empty</em><br>Authorization header not sent or token is not present in the header<br><em>Unrecognized token</em><br>Disabled account</p> |
| 400              | invalid\_query          | <p>For example:<br>Invalid value undefined supplied to : Query/dateRange: DateRange<br><br>-or-<br><br>Invalid value "XXXXX" supplied to : Query/dateRange: DateRange/end: Date</p> | <p><em>If the query sent is not in the expected schema</em><br>Date range is not sent in the ISO 8601 format</p>                                                        |
| 500              | internal\_server\_error | N/A                                                                                                                                                                                 | Error in DT's servers                                                                                                                                                   |

## Step 3: Receiving the Custom Report <a href="#step-3-receiving-the-custom-report-0-21" id="step-3-receiving-the-custom-report-0-21"></a>

To obtain the Custom Report, follow the steps below:

1. Receive the URL from the successful response in [Step 2](#h_01g4hmmgmv8hcpfj19m0wn6vvv).
2. Click the link. You are redirected to a folder which contains your report.

{% hint style="info" %}
The URL is valid for three hours.
{% endhint %}

## Additional Information and Restrictions <a href="#additional-information-and-restrictions-0-22" id="additional-information-and-restrictions-0-22"></a>

It is important to take note of the information, restrictions and rules to ensure the reports provided to ensure a successful response.

### General <a href="#general-0-23" id="general-0-23"></a>

* All reports are presented in US dollars
* The time zone used is UTC
* The data in the folder is available by 1200 UTC (noon) for the previous 10 days.

### Query Restrictions <a href="#query-restrictions-0-24" id="query-restrictions-0-24"></a>

* All dimensions are mandatory.

### Date Information <a href="#date-information-0-25" id="date-information-0-25"></a>

There are a number of rules that must be observed with regard to the date:

* The date must be in the format of ISO 8601. For example, 2019-10-03
* The date is included in the report
* The date is relevant from 16 February 2020

You must specify in the API Request the metrics and dimensions you want to include in your custom report.

## User Level Metrics and Dimensions <a href="#user-level-data-0-26" id="user-level-data-0-26"></a>

Set out in the tables below are the supported metrics and dimensions available in the User Level Reporting API.

### Metrics <a href="#metrics-0-27" id="metrics-0-27"></a>

| Supported Metrics | Description                                      |
| ----------------- | ------------------------------------------------ |
| Impressions       | Number of times the ad is displayed to the users |
| Revenue           | The total revenue of the publisher in USD        |

Discrepancies may occur since the number of impressions is based on our counting method and revenues are estimated.

### Dimensions <a href="#dimensions-0-28" id="dimensions-0-28"></a>

The following are the supported Dimensions for the User Level Reporting API:

| Supported Dimensions | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Ad Network Name      | For mediation, we use the network name and for DT Exchange networks we use 'DT Exchange'                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| Ad Unit ID           | The ad unit identifier in the DT system                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Container Type ID    | The identifier of the type of placement                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Advertising ID       | The Advertising ID for either Apple or Google                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| IDFV                 | An alphanumeric string that uniquely identifies a device to the app’s vendor. (This dimension is relevant to FairBid customers only).                                                                                                                                                                                                                                                                                                                                                                                                            |
| User ID              | The identifier of the user supplied by the publisher. (This dimension is relevant to FairBid customers only).                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Instance ID          | The Instance ID as generated by the demand network. Note: This is referred to differently, by various demand networks.                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Placement ID         | A Placement's identifier in the DT system                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Placement Type       | <p>Placement type describes how ads will look in your app and where ads will be located. Placement types can be either banner, interstitial or rewarded.<br><br><strong>Banner</strong><br><br>A basic placement type appearing at the top or bottom of the device's screen. Does not support video content<br><br><strong>Rewarded</strong><br>An ad placement type supporting video content<br><br><strong>Interstitial</strong><br>Full-page ads appear at natural breaks & transitions, such as level completion. Supports video content</p> |


# Mediation

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="1f50d">🔍</span> Browse Docs by Category</td><td><a href="/pages/86oVuITI1jRRuFHPrCCJ">/pages/86oVuITI1jRRuFHPrCCJ</a></td><td><a href="/pages/u1cOKPGXCoEOmcy0ZyuQ">/pages/u1cOKPGXCoEOmcy0ZyuQ</a></td><td><a href="/pages/s1OpWT4dWMqDUcBcVmZ1">/pages/s1OpWT4dWMqDUcBcVmZ1</a></td><td><a href="/pages/NYPCb7Y2lwxuz4eSdhbS">/pages/NYPCb7Y2lwxuz4eSdhbS</a></td><td><a href="/pages/P0BWFT7LyHd1tt6ztTIP">/pages/P0BWFT7LyHd1tt6ztTIP</a></td><td><a href="/pages/L2LyIcHidQ4r055PWP5I">/pages/L2LyIcHidQ4r055PWP5I</a></td><td><a href="/pages/XjX6mmCuqFT1MFA4YEgU">/pages/XjX6mmCuqFT1MFA4YEgU</a></td><td></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="2b50">⭐</span> Top Articles</td><td><a href="/pages/qClZ31Le1HgXit2ISAre">/pages/qClZ31Le1HgXit2ISAre</a></td><td><a href="/pages/UOeClcbgVivNo55O68kq">/pages/UOeClcbgVivNo55O68kq</a></td><td><a href="/pages/d2b1576afadd4e93b66f52a2b4efbe1fef16154d">/pages/d2b1576afadd4e93b66f52a2b4efbe1fef16154d</a></td><td><a href="/pages/2yJWG2Rx4pU6YSZxFgQC">/pages/2yJWG2Rx4pU6YSZxFgQC</a></td><td><a href="/pages/zrnLwhA1cqI7XJULEcKr">/pages/zrnLwhA1cqI7XJULEcKr</a></td><td><a href="/pages/khaQTxZiuy1Abj3AZMZ2">/pages/khaQTxZiuy1Abj3AZMZ2</a></td><td><a href="/pages/V7lLrqt9MxtEBvrHg1lo">/pages/V7lLrqt9MxtEBvrHg1lo</a></td><td></td></tr></tbody></table>


# Getting Started with DT FairBid

DT FairBid is a mediation platform that gives developers and publishers control over which ad networks to integrate, how to prioritize them (if using a waterfall approach), and how to optimize ad placements to maximize revenue. DT FairBid supports integration with an array of leading ad networks.

To get started with DT FairBid:

## Set Up Your App in the DT Console <a href="#h_01jh3wa5hca9jf9exn9jve6fy2" id="h_01jh3wa5hca9jf9exn9jve6fy2"></a>

As a DT Publisher, add your app and placements to the DT ecosystem via the [DT Console](https://console.fyber.com/). For more information about how to set up your app and placements for DT FairBid, see [Setting Up You App in the DT Console](/dt-fairbid/getting-started-with-dt-fairbid/setting-up-your-app-in-the-dt-console). For more information about how to become a DT Publisher, see [Signing Up for DT Console](/dt-console/authorization/signing-up-for-dt-console).

## Integrate the DT FairBid SDK <a href="#h_01ha9fr0c511psbmh261b1sehf" id="h_01ha9fr0c511psbmh261b1sehf"></a>

The DT FairBid SDK is platform-specific for Android, iOS, and Unity and allows you to offer your placements across all mediated networks. For more information about how to integrate the DT FairBid SDK, see [SDK Integration](/dt-fairbid/fairbid-sdk/sdk-integration).


# Setting Up Your App in the DT Console

The DT Console is the DT self-service portal where you can set up your app for monetization with DT FairBid. You must have DT Publisher credentials to sign in to the DT Console.

For more information, see articles on [Signing Up for DT Console](/dt-console/authorization/signing-up-for-dt-console) and [Signing In to the DT Console](/dt-console/authorization/signing-in-to-the-dt-console).

Once you have the credentials and your account has been confirmed, configure your app:

* [Step 1: Add your app](#h_01jgn93gjez2wz2wbeq05j8g93).
* [Step 2: Add placements to your app](#h_01jgn93gjet34twjgf2pda1h00).
* [Step 3: Add networks to your app](#h_01jgn93gje60qc8q93ck0c6x2a).
* [Step 4: Add instances to your placements](#h_01jgn93gje7jxn2dgf1b15m9w1).

## Step 1: Add Your App <a href="#h_01jgn93gjez2wz2wbeq05j8g93" id="h_01jgn93gjez2wz2wbeq05j8g93"></a>

The DT Console allows you to add your app whether or not it is published in an app store. When you add your app, you can either add placements and networks at the same time or add your placements and networks after adding your app.

To add your app using the DT Console:

1. In the [DT Console](https://console.fyber.com/), go to **Monetization → App Management**, and click **Add App**.
2. Enter details about your app.\
   For more information, see our [Adding an App](/dt-console/app-management/adding-a-new-app) article.
3. Enter placements for your app as described in [Working with Placements When Adding an App](/dt-console/app-management/adding-a-new-app/working-with-placements-when-adding-an-app), or skip this step now and add them later.
4. Add mediation networks as described in [Adding Ad Networks When Adding an App](/dt-console/app-management/adding-a-new-app/adding-ad-networks-when-adding-an-app), or skip this step now and add them later.
5. Click **Add app**.

## Step 2: Add Placements to Your App <a href="#h_01jgn93gjet34twjgf2pda1h00" id="h_01jgn93gjet34twjgf2pda1h00"></a>

You can add multiple placements to one app, and you must add at least one placement to monetize your app. For each placement, you can define a specific ad format, configuration, and delivery rules to maximize performance.

To add a placement to your app:

1. In the [DT Console](https://console.fyber.com/), go to **Monetization → App Management**, and click your app.
2. On the **Placements** tab, click **Add placement**.
3. Enter basic placement details (ad type, floor price, and name), and click **Add** at the end of the new placement row.\
   For more information, see [Setting Up Placements](/dt-console/app-management/setting-up-an-existing-app/setting-up-placements).
4. To configure additional placement settings (targeting, refresh rate, capping, pacing, etc.), click the newly added placement, enter the desired settings, and click **Save**.

## Step 3: Add Networks to Your App <a href="#h_01jgn93gje60qc8q93ck0c6x2a" id="h_01jgn93gje60qc8q93ck0c6x2a"></a>

Mediated networks are the networks you want DT FairBid to mediate. Adding a mediated network requires you to share network parameters with DT. The parameters that you must provide vary by network. For more information about which network parameters to provide, see the appropriate [Network Integration Guide](/dt-fairbid/fairbid-sdk/supported-networks/network-integration-guides).

To add a mediated network for your app:

1. In the [DT Console](https://console.fyber.com/), go to **Monetization → App Management**, and click your app.
2. On the **Networks** tab, click **Add network**.
3. Enter the required network parameters, and click **Add network**.\
   For more information, see [Setting Up Mediated Networks](/dt-console/app-management/setting-up-an-existing-app/setting-up-mediated-networks).

## Step 4: Add Instances to Your Placements <a href="#h_01jgn93gje7jxn2dgf1b15m9w1" id="h_01jgn93gje7jxn2dgf1b15m9w1"></a>

Mediated network instances, also known as *instances*, indicate the networks on which you want to offer a particular placement. For Waterfall mediation, DT offers your placement to each network in the order you set for the placement. For bidding networks, DT conducts an auction of your placement to all bidding networks you add to a placement.

To add an instance to a placement:

1. In the [DT Console](https://console.fyber.com/), go to **Monetization → App Management**, and click your app.
2. On the **Placements** tab, click the placement to which you want to add a network instance, and click **Add instance**.
3. Select one of the mediated networks available for this app, enter basic details for the instance (**Name**, **Instance ID**, and **Worldwide CPM**), and click **Add instance**.\
   For more information, see [Setting Up Instances](/dt-console/app-management/setting-up-an-existing-app/setting-up-instances).
4. To configure additional instance settings (pricing and targeting), click the newly added instance, enter the desired settings, and click **Save**.

<br>


# FairBid SDK


# SDK Integration

This section explains how to integrate the DT FairBid SDK for Android, iOS, and Unity apps. Android and iOS require platform-specific setup, whereas Unity uses plugins for integration to simplify the process and ensure cross-platform compatibility.

## Integration Overview

{% stepper %}
{% step %}

### Get the SDK

* [Android](/dt-fairbid/fairbid-sdk/sdk-integration/android)
* [iOS](/dt-fairbid/fairbid-sdk/sdk-integration/ios)
* [Unity](/dt-fairbid/fairbid-sdk/sdk-integration/unity)
  {% endstep %}

{% step %}

### [Set Up DT FairBid in DT Console](/dt-fairbid/getting-started-with-dt-fairbid/setting-up-your-app-in-the-dt-console)

{% endstep %}

{% step %}

### [Initialize the SDK](/dt-fairbid/fairbid-sdk/initializing-the-sdk)

{% endstep %}

{% step %}

### [Integrate Ad Formats](/dt-fairbid/fairbid-sdk/ad-formats)

{% endstep %}
{% endstepper %}


# Android

{% hint style="info" %}
**Current SDK Version: 3.67.0**
{% endhint %}

{% hint style="success" %}
DT FairBid and DT Offer Wall are integrated through the same SDK: the DT FairBid SDK.
{% endhint %}

## Prerequisites <a href="#id-01h537tc7mw967s8m370eqbmy3" id="id-01h537tc7mw967s8m370eqbmy3"></a>

* Android 4.4 (API Level 19) or later
* Kotlin 2.1.0 or later
* Google Play Services 11.4.0 or later

### Tooling <a href="#h_01jqf2dk4pfp8yvwa6swx1hchm" id="h_01jqf2dk4pfp8yvwa6swx1hchm"></a>

FairBid SDK does not require specific tooling, e.g., Android Studio, Android Gradle Plugin (AGP), Java Development Kit (JDK), and Gradle. However, if you use the following versions of Gradle, use the following versions of AGP and JDK:

* For Gradle 7.5 or later:
  * AGP 7.5. or later
  * JDK 11
* For Gradle 8 or later:
  * AGP 8 or later
  * JDK 17

### Compile and Target SDK <a href="#h_01jqf2dk4pj68rzcs6wqkj2v99" id="h_01jqf2dk4pj68rzcs6wqkj2v99"></a>

FairBid SDK does not require specific compile or target SDK versions for your app. It maintains compatibility by performing runtime checks for APIs that are not available in the minimum supported version (API Level 19). The highest Android API that FairBid directly utilizes is API Level 30.

## Integration <a href="#id-01h537tc7m8na96fcax6qt79jc" id="id-01h537tc7m8na96fcax6qt79jc"></a>

DT supports both Gradle dependencies and manual downloads to integrate the SDK.

### Gradle <a href="#id-01h537tc7mb6d5fec8vse3egkn" id="id-01h537tc7mb6d5fec8vse3egkn"></a>

Add DT Maven repository and plugins to your Gradle build script:

1. Add the following to your project's root-level `build.gradle` file inside the `repositories` section.
2. At the root level `build.gradle` file, there are usually two repository sections - one for `buildscript` and one for `allprojects`. Add the entry in `allprojects`:

{% code title="Gradle" %}

```groovy
allprojects {
    repositories {
        mavenCentral()
    }
    ...
}
```

{% endcode %}

3. Add the following to the project app-level `build.gradle` file inside the plugins section.\
   For more information, see [Types of Gradle Plugins](https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block):

{% code title="Gradle" %}

```groovy
plugins {
    ...
    id 'com.fyber.fairbid-sdk-plugin' version '3.67.0'
    ...
}
```

{% endcode %}

4. If you support Android SDK below 26, add the following snippet to the `Android` section (for Java Version Compatibility):

{% code title="Gradle" %}

```java
android {
    ...
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    ...
}
```

{% endcode %}

### Manual Download <a href="#h_01hp1ca0z3n7v15289kngbv0cp" id="h_01hp1ca0z3n7v15289kngbv0cp"></a>

<a href="https://storage.googleapis.com/gcs-fairbid-sdk-assets-prod-useast1/fairbid-sdk/android/FairBid-Android-SDK-3.67.0.zip" class="button secondary" data-icon="arrow-down">Android SDK 3.67.0</a>

1. Download the DT FairBid SDK.
2. Extract the file.
3. Import the `.aar` packages into your project.

### Optional Permissions <a href="#id-01h537tc7nhe4qyqsrzjqp7at0" id="id-01h537tc7nhe4qyqsrzjqp7at0"></a>

The following permissions are not required for our SDK or 3rd-party SDKs to function, but including them in your `AndroidManifest.xml` may result in improved eCPM and user experience:

{% code title="XML" %}

```xml
<!-- Optionally used by FairBid -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
```

{% endcode %}

In addition to integrating the DT FairBid SDK, you must integrate chosen third-party networks' SDKs into their app.

* Set up your app in the network's dashboard and in the DT Console. For more information, see [Setting Up DT FairBid](/dt-fairbid/getting-started-with-dt-fairbid/setting-up-your-app-in-the-dt-console).
* Download the relevant network's SDK. For more information about supported networks and their SDKs, see [Supported Networks](/dt-fairbid/fairbid-sdk/supported-networks).
  * You must add additional configurations for each third-party network.
  * These entries are found by selecting your third-party networks in the table.

{% hint style="info" %}
The DT FairBid SDK automatically detects and initializes SDKs from third-party networks.
{% endhint %}

Once you've added all third-party SDKs and [set up your app in the console](/dt-fairbid/getting-started-with-dt-fairbid/setting-up-your-app-in-the-dt-console), you can [initialize the DT FairBid SDK](/dt-fairbid/fairbid-sdk/initializing-the-sdk).


# iOS

{% hint style="info" %}
**Current SDK Version: 3.67.0**
{% endhint %}

{% hint style="success" %}
DT FairBid and DT Offer Wall are integrated through the same SDK: the DT FairBid SDK.
{% endhint %}

## Prerequisites <a href="#id-01h52k20xn3w1r8hv3e2teaahs" id="id-01h52k20xn3w1r8hv3e2teaahs"></a>

* Xcode 26.0 or later
* iOS 13 or later

## Integration <a href="#id-01h52k20xpe4nyqpntbp0y2hzy" id="id-01h52k20xpe4nyqpntbp0y2hzy"></a>

There are three frameworks required to incorporate into your app:

* [FairBid SDK](#id-01h66phhep5pfxsk67y0yn1q14)
* [FMPAdapter.framework](https://github.com/inner-active/FMPAdapter)
* [IASDKCore.framework](#id-01h66phhep5pfxsk67y0yn1q14)

Digital Turbine supports CocoaPods, Swift Package Manager, and manual downloads to integrate the SDK.

### CocoaPods <a href="#id-01h52k20xqbnnha51mgxtat84f" id="id-01h52k20xqbnnha51mgxtat84f"></a>

Add the following line to your `Podfile` and run the `pod install` command:

{% code title="Ruby" %}

```ruby
pod 'FairBidSDK', '~ 3.67.0'
```

{% endcode %}

### Swift Package Manager <a href="#id-01jjhd4yx4spm000000000001" id="id-01jjhd4yx4spm000000000001"></a>

The DT FairBid SDK can be integrated using Swift Package Manager as an alternative to CocoaPods. The SPM package delivers `FMPAdapter` and `IASDKCore` automatically, so you don't need to add them separately.

1. In Xcode, open your project and go to **File→Add Package Dependencies…**.
2. In the **Search/URL** field, paste the FairBid package URL:

```
https://github.com/DigitalTurbine/FairBid-iOS-SPM
```

3. Set the **Dependency Rule** to **Up to Next Minor Version** starting from the version you want to integrate (for example, `3.67.0`), and click **Add Package**.
4. When prompted, select the **FairBidSDK** library product, add it to your app target, and click **Add Package**.
5. Select your app target and go to **Build Settings**. For **Other Linker Flags** (`OTHER_LDFLAGS`), add the `-ObjC` linker flag.

{% hint style="warning" %}
This flag is required for every project, Swift and Objective-C alike. Swift Package Manager doesn't pass linker flags to your app target automatically. Without it, your app may crash at runtime.
{% endhint %}

6. Configure your Xcode project as described in [Configuring Your Xcode Project](#id-01h52m1583064xsbekg5dntses).

### Manual Download <a href="#id-01h66phhep5pfxsk67y0yn1q14" id="id-01h66phhep5pfxsk67y0yn1q14"></a>

<a href="https://storage.googleapis.com/gcs-fairbid-sdk-assets-prod-useast1/fairbid-sdk/ios/FairBid-iOS-SDK-3.67.0.zip" class="button secondary" data-icon="arrow-down">iOS SDK 3.67.0</a>

1. Download and extract the DT FairBid SDK.
2. Drag and drop `FairBidSDK.xcframework` to your project.\
   The **Choose options for adding these files** window appears:

<div align="left" data-with-frame="true"><img src="/files/6NHa1HjzdKfdnlCBFkiw" alt=""></div>

3. In the **Action** drop-down list, select **Copy files to destination** and click **Finish**.

<div align="left" data-with-frame="true"><img src="/files/8KMAAEW6lMjoxJURpAGW" alt=""></div>

4. Download the [DTX iOS SDK FMPAdapter](https://github.com/inner-active/FMPAdapter).
5. Drag and drop the `FMPAdapter.xcframework` to your project.\
   The **Choose options for adding these files** window appears:
6. In the **Action** drop-down list, select **Copy files to destination** and click **Finish**.

<div align="left" data-with-frame="true"><img src="/files/TUTHdc4e8cUDadedlgc0" alt=""></div>

7. Retrieve the `IASDKCore.framework` from [Integrating the iOS SDK](/dt-exchange/sdk-configuration/integrating-the-ios-sdk) and download the SDK manually.
8. From `DTExchangeSDK`/`iOS`/`IASDKCore`/`IASDKCore.xcframework`, drag and drop the `IASDKCore.xcframework` to your project.\
   The **Choose options for adding these files** window appears:
9. In the **Action** drop-down list, select **Copy files to destination** and click **Finish**.

<div align="left" data-with-frame="true"><img src="/files/VJJ0f2CH2gxQVLcNfE6w" alt=""></div>

10. From the **General** tab of your Xcode project's target settings page, ensure `DT FairBidSDK`, `FMPAdapter`, and `IASDKCore` frameworks are embedded into your app under **Embed & Sign**.

<div align="left" data-with-frame="true"><img src="/files/bYXH1O7RSoaSk2KenNB9" alt=""></div>

### Configuring Your Xcode Project <a href="#id-01h52m1583064xsbekg5dntses" id="id-01h52m1583064xsbekg5dntses"></a>

Configuration of the Xcode projects involves the following steps.

1. [Import System Frameworks](#h_01jjhd4yx4hm46twaae8zemnyt).
2. [Disable Multitasking](#h_01jjhd4yx4ke8debtq0n0207em).
3. [Disable the Linked Products Build Flag](#h_01jjhd4yx4g4p6enwe2b0a1558).
4. [App Transport Security](#h_01jjhd4yx4jcr5ze04nfkjkpqv).

#### Importing System Frameworks <a href="#h_01jjhd4yx4hm46twaae8zemnyt" id="h_01jjhd4yx4hm46twaae8zemnyt"></a>

If the **Enable Modules** (`CLANG_ENABLE_MODULES`) option is active in the project's Build Settings; there's no need to import any frameworks manually. Import the DT FairBid framework umbrella header in your code, for example, in the AppDelegate class:

{% tabs %}
{% tab title="Swift" %}

```swift
#import <FairBidSDK/FairBidSDK.h>
```

{% endtab %}

{% tab title="Objective-C" %}

```objective-c
import FairBidSDK
```

{% endtab %}
{% endtabs %}

If you cannot enable modules, you might need to add the following frameworks to the **Frameworks, Libraries and Embedded Content** section in Xcode:

* `AdSupport`
* `CoreGraphics`
* `CoreLocation`
* `CoreTelephony`
* `MediaPlayer`
* `MessageUI`
* `MobileCoreServices`
* `QuartzCore`
* `Security`
* `StoreKit`
* `SystemConfiguration`

#### Disable Multitasking <a href="#h_01jjhd4yx4ke8debtq0n0207em" id="h_01jjhd4yx4ke8debtq0n0207em"></a>

Select the **Requires full-screen** checkbox from the **General** tab of your Xcode project's target settings page.\
This disables multitasking support, which must be disabled for ads to be able to set the orientation of their views:

<div align="left" data-with-frame="true"><img src="/files/2kteFmR4p7XZMqf99b6J" alt=""></div>

#### Disable the Linked Products Build Flag <a href="#h_01jjhd4yx4g4p6enwe2b0a1558" id="h_01jjhd4yx4g4p6enwe2b0a1558"></a>

By default, Xcode strips libraries linked to the project. This may result in symbols missing for some ad networks, and subsequently, the DT FairBid SDK may not behave as expected.

To avoid this, set **Strip Linked Products** (`STRIP_INSTALLED_PRODUCT`) build flag to **No**:

<div align="left" data-with-frame="true"><img src="/files/uOhoTAXphm9fdTbncKSF" alt=""></div>

#### App Transport Security <a href="#h_01jjhd4yx4jcr5ze04nfkjkpqv" id="h_01jjhd4yx4jcr5ze04nfkjkpqv"></a>

App Transport Security (ATS) Settings is an Apple security feature that enforces HTTPS connections. Make sure you disable this by setting the **Allow Arbitrary Loads** property to **Yes** so that you get the HTTP traffic as well. For more information, see [ATS Configuration for DT Exchange SDK](/dt-exchange/sdk-configuration/integrating-the-ios-sdk/ats-configuration-for-dt-exchange-sdk).

In addition to integrating the DT FairBid SDK, you must integrate chosen third-party networks' SDKs into their app.

* Set up your app in the network's dashboard and in the DT Console. For more information, see [Setting Up DT FairBid](/dt-fairbid/getting-started-with-dt-fairbid/setting-up-your-app-in-the-dt-console).
* Download the relevant network's SDK. For more information about supported networks and their SDKs, see [Supported Networks](/dt-fairbid/fairbid-sdk/supported-networks).
  * You must add additional configurations for each third-party network.
  * These entries are found by selecting your third-party networks in the table.

{% hint style="info" %}
The DT FairBid SDK automatically detects and initializes SDKs from third-party networks.
{% endhint %}

Once you've added all third-party SDKs and [set up your app in the console](/dt-fairbid/getting-started-with-dt-fairbid/setting-up-your-app-in-the-dt-console), you can [initialize the DT FairBid SDK](/dt-fairbid/fairbid-sdk/initializing-the-sdk).

{% hint style="success" %}
The SKAdNetwork ID list may change over time. To ensure you have the most current information, DT recommends integrating the [SKAdNetwork ID Auto Updater Tool](/dt-fairbid/fairbid-sdk/sdk-reference/skadnetwork-id-auto-updater) into your build.
{% endhint %}


# Unity

{% hint style="info" %}
**Current Plugin Version: 3.67.0**
{% endhint %}

{% hint style="success" %}
DT FairBid and DT Offer Wall are integrated through the same Unity Plugin: the DT FairBid Plugin.
{% endhint %}

## Prerequisites <a href="#id-01h54c060kcx1833e30tnfc7pb" id="id-01h54c060kcx1833e30tnfc7pb"></a>

* Android 4.4 (API Level 19) or later
* iOS 13 or later
* Unity 2021 or later

{% hint style="danger" %}
Integrating DT FairBid for Unity iOS development requires a macOS environment. Building your iOS/Xcode project is not supported on Windows.
{% endhint %}

### Tooling <a href="#h_01jqf2dk4qh60s5wf7zn6p2xr4" id="h_01jqf2dk4qh60s5wf7zn6p2xr4"></a>

When integrating the FairBid SDK into your Unity app, make sure your development environment meets the following minimum compatibility requirements.

| UNITY EDITOR | ANDROID SDK  | KOTLIN | GRADLE | JDK | AGP   |
| ------------ | ------------ | ------ | ------ | --- | ----- |
| 2022.3       | API Level 19 | 2.1.0  | 7.6.3  | 11  | 7.4.2 |
| 2021.3       | API Level 19 | 2.1.0  | 7.6.3  | 11  | 7.4.2 |

While FairBid *may* work with other Unity Editor versions, DT tests FairBid against these specific versions. Additionally, the recommended tooling (JDK, Gradle, and AGP) versions reflect the defaults included with each Unity version. These can be overridden, but DT recommends using these versions to avoid conflicts in your build process.

## Integration <a href="#id-01h54c060kbzybef6cmntwws31" id="id-01h54c060kbzybef6cmntwws31"></a>

Digital Turbine supports two methods for integration in Unity:

* [Integrating through Unity's Package Manager](#id-01h54c060kv9r4vsde3fbb311r) (recommended)
* [Importing FairBid Unity Plugin Raw Package](#id-01h54c060k0besyr5g23dxwkj1)

### Integrating Through Unity's Package Manager <a href="#id-01h54c060kv9r4vsde3fbb311r" id="id-01h54c060kv9r4vsde3fbb311r"></a>

{% hint style="info" %}
This is the recommended method to integrate the DT FairBid Unity Plugin in your Unity project.
{% endhint %}

The DT FairBid Unity Plugin is provided as a package in the [NPM](https://www.npmjs.com/package/com.fyber.fairbid.unity) package registry. This package is imported using Unity Package Manager.

To import the package:

1. Add the following entries inside your `manifest.json`, which you can find under the `Packages` folder:

* Add an entry under `scopedRegistries`. Unity knows where to search when adding the DT FairBid Unity Plugin dependency. This entry points to the NPM package registry.

{% code title="JSON" %}

```json
{
    …
    "scopedRegistries": [
        {
            "name": "npmjs",
            "url": "https://registry.npmjs.org/",
            "scopes": [
                "com.fyber.fairbid.unity"
            ]
        }
        …
      ],
    …
}
```

{% endcode %}

* Add an entry under `dependencies`, which references the DT FairBid Unity Plugin version that you intend to integrate.

{% code title="JSON" %}

```json
{
    …
    "dependencies": {
        "com.fyber.fairbid.unity": "3.67.0",
        …
    }
    …
}  
```

{% endcode %}

2. Save the changes and open your Unity 3D Project.\
   The Unity Package Manager resolves the dependencies, and now the **DT FairBid Unity Plugin** is integrated into the project.
3. To cross-check the integration of DT FairBid, navigate to the Unity 3D **Window** toolbar menu and click **Package Manager**.\
   The Package Manager window shows **DT FairBid** under the DT section, and the DT FairBid Unity Plugin version.

You can also change the DT FairBid Unity Plugin version you are integrating through the Unity Package Manager.

### Importing DT FairBid Unity Plugin Raw Package <a href="#id-01h54c060k0besyr5g23dxwkj1" id="id-01h54c060k0besyr5g23dxwkj1"></a>

Follow the instructions below to download the DT FairBid Unity Plugin package manually.

#### Manual Download <a href="#id-01h54c060kps9xc2s8ds1sbm6j" id="id-01h54c060kps9xc2s8ds1sbm6j"></a>

<a href="https://storage.googleapis.com/gcs-fairbid-sdk-assets-prod-useast1/fairbid-sdk/unity/FairBid-Unity-SDK-3.67.0.zip" class="button secondary" data-icon="arrow-down">Unity Plugin 3.67.0</a>

#### Removing Current Plugin <a href="#id-01h54c060kcqbng41wm84vx71p" id="id-01h54c060kcqbng41wm84vx71p"></a>

If you are updating the Plugin:

1. Make sure there is no trace of the previous version of the DT FairBid Unity Plugin.
2. Remove the `FairBid` folder.

This is a fail-safe way to ensure no legacy file is left behind:

<div align="left" data-with-frame="true"><img src="/files/6RLGu5TEJcdz8XuHnKkA" alt=""></div>

#### Importing New Plugin <a href="#id-01h54c060kcyca4kqkdmjn5e0w" id="id-01h54c060kcyca4kqkdmjn5e0w"></a>

1. Download the DT FairBid Unity Plugin.
2. Unzip the downloaded files.
3. Add the `FairBid.unitypackage` to your open Unity project.

## Using the External Dependency Manager (EDM4U)

The [External Dependency Manager for Unity (EDM4U)](https://github.com/googlesamples/unity-jar-resolver), previously known as the Unity Jar Resolver, is an open-source tool that automatically manages native Android and iOS dependencies.

### Declaring Network Dependencies

To declare network dependencies:

1. Create a new XML file.
2. Name the file with a `Dependencies.xml` suffix, for example, `FairBidMediationDependencies.xml`.
3. Add the file to the **Editor** folder.
4. Copy the required XML snippet for your selected network to the XML file.\
   To generate the required XML snippet, see [Supported Networks](/dt-fairbid/fairbid-sdk/supported-networks).

### Resolving Dependencies

Dependency resolution works differently on Android and iOS; follow the instructions in the appropriate tab below.

{% tabs %}
{% tab title="Android" %}
Dependencies resolve automatically for Android.

(Optional) To force dependency resolution:

* Go to **Assets→External Dependency Manager→Android Resolver→Force Resolve**.

<div align="left"><figure><img src="/files/FlUUcYiMqMwhV2nnGuKG" alt="" width="563"><figcaption></figcaption></figure></div>
{% endtab %}

{% tab title="iOS" %}
EDM4U automatically resolves all the dependencies declared in a specific `.xml` file and adds the respective entries to your `Podfile`.\
In iOS, resolution occurs when you export the project.

To avoid compilation errors, configure the following iOS Resolver settings:

1. Navigate to **Assets→External Dependency Manager→iOS Resolver→Settings**.
2. Deselect the **Link frameworks statically** checkbox.

{% hint style="warning" %}
If you do not deselect this option, you may encounter a compilation error about missing the `FairBidSDK/FairBidSDK-Swift.h` file.
{% endhint %}

3. Open the `.xcworkspace` file in Xcode, not the `.xcodeproj` file.\
   EDM4U creates the `.xcworkspace` file when it builds the project.
4. Locate the `Podfile` in the build folder and run `pod install` when the `.xcworkspace` file does not appear to generate `.xcworkspace`.
   {% endtab %}
   {% endtabs %}

In addition to integrating the DT FairBid SDK, you must integrate chosen third-party networks' SDKs into their app.

* Set up your app in the network's dashboard and in the DT Console. For more information, see [Setting Up DT FairBid](/dt-fairbid/getting-started-with-dt-fairbid/setting-up-your-app-in-the-dt-console).
* Download the relevant network's SDK. For more information about supported networks and their SDKs, see [Supported Networks](/dt-fairbid/fairbid-sdk/supported-networks).
  * You must add additional configurations for each third-party network.
  * These entries are found by selecting your third-party networks in the table.

{% hint style="info" %}
The DT FairBid SDK automatically detects and initializes SDKs from third-party networks.
{% endhint %}

Once you've added all third-party SDKs and [set up your app in the console](/dt-fairbid/getting-started-with-dt-fairbid/setting-up-your-app-in-the-dt-console), you can [initialize the DT FairBid SDK](/dt-fairbid/fairbid-sdk/initializing-the-sdk).


# Initializing the SDK

Initialize the SDK once per app session, preferably at app launch.

The following table provides a list of parameter values to include when you initialize the DT FairBid SDK:

| PARAMETER   | TYPE   | STATUS   | DESCRIPTION                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ----------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `DT_App_ID` | String | Required | <p>DT assigns the DT App ID to all apps added to the DT ecosystem via the DT Console. For more information about adding an app, see <a href="/pages/zrnLwhA1cqI7XJULEcKr">Setting Up DT FairBid</a>.<br>To locate the DT App ID, log in to the <a href="https://console.fyber.com/login">DT Console</a>, and go to <strong>Monetization→App Management</strong>. The <strong>Apps dashboard</strong> displays a list of your apps, and App IDs display below each app name.</p>                                                  |
| `user_id`   | String | Optional | <p>The <code>user\_id</code> is a unique identifier (256 characters or less) that allows you to differentiate individual app users.<br>DT recommends setting a <code>user\_id</code>, as it greatly assists with key functions such as <a href="/pages/A09UBRGMne9TzE5iT6Vs">server-side rewarding</a> for rewarded ads, counting unique users accurately, and user level reporting.<br>Setting the <code>user\_id</code> at SDK initialization is optional; however, you must specify it prior to requesting a rewarded ad.</p> |

To initialize the DT FairBid SDK, use the following code snippets to specify your `DT_App_ID` and optional `user_id`.

{% tabs %}
{% tab title="Android" %}
{% code title="Kotlin" %}

```kotlin
import com.fyber.FairBid
FairBid.start("DT_App_ID", activity)
// recommended
UserInfo.setUserId("user_id")
```

{% endcode %}

{% code title="Java" %}

```java
import com.fyber.FairBid;
FairBid.start("DT_App_ID", activity);
// recommended
UserInfo.setUserId("user_id");
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
import FairBidSDK
FairBid.start(withAppId: "DT_App_ID")
// recommended
FairBid.user().userId = "user_id"
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
#import <FairBidSDK/FairBid.h>
[FairBid startWithAppId:@"DT_App_ID"];
// recommended
[FairBid user].userId = @"user_id";
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
using Fyber;
FairBid.Start("DT_App_ID");
// recommended
UserInfo.SetUserId("user_id");
```

{% endcode %}
{% endtab %}
{% endtabs %}


# Ad Formats

After creating placements in the [DT Console](https://console.fyber.com/), add the code snippets in the chosen context of your app. Access the Placement ID using the copy button next to the placement name.

<div align="left" data-with-frame="true"><img src="/files/q9BRhLhLwqq4PHzjXGBp" alt=""></div>

For more information about creating placements in the DT Console, see [Add Placements to Your App](/dt-fairbid/getting-started-with-dt-fairbid/setting-up-your-app-in-the-dt-console#h_01jgn93gjet34twjgf2pda1h00).

DT supports the following ad types:

* [Banner Ads](/dt-fairbid/fairbid-sdk/ad-formats/banner-ads)
* [Interstitial Ads](/dt-fairbid/fairbid-sdk/ad-formats/interstitial-ads)
* [Rewarded Ads](/dt-fairbid/fairbid-sdk/ad-formats/rewarded-ads)
* [Medium Rectangle Ads](/dt-fairbid/fairbid-sdk/ad-formats/medium-rectangle-ads)

<br>


# Banner Ads

## Banner Ads

**Banners** are rectangular ads that appear at the top or bottom of the screen when the user interacts with your app. The user can view banners but cannot dismiss them. The DT FairBid SDK automatically refreshes banners after 20 seconds.

{% hint style="info" %}
The DT FairBid SDK automatically refreshes banners. To avoid discrepancies between DT and third-party network reporting, *disable* any automatic or manual banner refresh settings on third-party network SDKs.
{% endhint %}

### Showing a Banner

Implement the code below to show a Banner:

{% tabs %}
{% tab title="Android" %}
{% code title="Kotlin" %}

```kotlin
val placementId = "12345"
Banner.show(placementId, activity)
```

{% endcode %}

{% code title="Java" %}

```java
String placementId = "12345";
Banner.show(placementId, activity);
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
let options = FYBBannerOptions(placementId: placementId)
FYBBanner.show(in: view, options: options)
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
FYBBannerOptions *options = [[FYBBannerOptions alloc] initWithPlacementId:placementId];
[FYBBanner showBannerInView:view options:options];
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
string placementId = "1234";
Banner.Show(placementId);
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Hiding the Banner

If you want to hide the banner temporarily, implement the code below:

{% tabs %}
{% tab title="Android" %}
{% code title="Kotlin" %}

```kotlin
//hides the banner for a specific placement
val placementId = "12345"
Banner.hide(placementId)
```

{% endcode %}

{% code title="Java" %}

```java
//hides the banner for a specific placement
String placementId = "12345";
Banner.hide(placementId);
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
let placementId = "1234" FYBBanner.hide(placementId)
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
NSString *placementId = @"1234"; [FYBBanner hide:placementId];
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
string placementId = "1234";
Banner.Hide(placementId);
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Destroying the Banner

Once you have decided that you no longer want to use the banner, you must destroy it.

To destroy the banner, implement the code below:

{% tabs %}
{% tab title="Android" %}
{% code title="Kotlin" %}

```kotlin
//destroys the banner for a specific placement
val placementId = "12345"
Banner.destroy(placementId)
```

{% endcode %}

{% code title="Java" %}

```java
//destroys the banner for a specific placement
String placementId = "12345";
Banner.destroy(placementId);
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
let placementId = "1234" FYBBanner.destroy(placementId)
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
NSString *placementId = @"1234"; [FYBBanner destroy:placementId];
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
string placementId = "1234";
Banner.Destroy(placementId);
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Banner Position

You can show your banner at the top or bottom of your screen. If you want to change this behavior, use the following code:

{% tabs %}
{% tab title="Android" %}

#### Top

{% code title="Kotlin" %}

```kotlin
val bannerOptions = BannerOptions().placeAtTheTop()
val placementId = "12345"
Banner.show(placementId, bannerOptions, activity)
```

{% endcode %}

{% code title="Java" %}

```java
BannerOptions bannerOptions = new BannerOptions().placeAtTheTop();
String placementId = "12345";
Banner.show(placementId, bannerOptions, activity);
```

{% endcode %}

#### Custom View

{% code title="Kotlin" %}

```kotlin
val bannerOptions = BannerOptions().placeInContainer(viewGroup)
val placementId = "12345"
Banner.show(placementId, bannerOptions, activity)
```

{% endcode %}

{% code title="Java" %}

```java
BannerOptions bannerOptions = new BannerOptions().placeInContainer(viewGroup);
String placementId = "12345";
Banner.show(placementId, bannerOptions, activity);)
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
This feature is not available for iOS.
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
string placementId = "1234";
BannerOptions bannerOptions = new BannerOptions();
bannerOptions.DisplayAtTheTop();
Banner.Show(placementId, bannerOptions);
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Loading a Banner

{% hint style="warning" %}
Use this implementation only if DT FairBid is not your main mediation platform.
{% endhint %}

If you want to use DT FairBid with other mediations or demand sources, you can pre-load a banner to review its pricing and other details. This allows you to compare it against banners from other demand sources outside our platform before showing it.

{% tabs %}
{% tab title="Android" %}
To load a banner, create a `BannerView` object instance and then call the `load` method. Please be aware that this integration method disables banner refresh, and you must add your own refresh logic.

This is supported starting DT FairBid Android SDK 3.51.0.

{% code title="Kotlin" %}

```kotlin
val bannerContainer: FrameLayout
val placementId = "12345"

val bannerView = BannerView(requireContext(), placementId)
banner.bannerListener = object : BannerListener {
  //...
}
bannerView.load()

//Once the ad is loaded and ready, you can check the pre-impression data
val impressionData = bannerView.impressionData

// To show the banner, attach the bannerView to the Banner Container
bannerContainer.addView(bannerView)

//Once the banner is no longer needed, you can destroy it
bannerView.destroy()
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
You are responsible for adding `FYBBannerAdView` instance to your view hierarchy. This `FYBBannerAdView` instance is available on `bannerDidLoad:impressionData: callback`. To pre-load a banner, implement the code below:

{% code title="Swift" %}

```swift
/* 1. Assign FYBBannerDelegate instance to handle banner events */
FYBBanner.delegate = self

/* 2. Define the banner placement ID
 Replace `placementId` with your actual banner placement ID */
let placementId = "<#banner placementId#>"

/* 3. Initialize a new FYBBannerOptions instance with a specified placement ID and size.
 FYBBannerSizeSmart automatically adjusts the banner size based on the device's screen width. */
let bannerOptions = FYBBannerOptions(placementId: placementId, size: .smart)

/* 4. Request to load a banner ad with the specified options.
 This method fetches the banner creative but does not show it. */
FYBBanner.request(with: bannerOptions)
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
#import <FairBidSDK/FairBid.h>
/// 1. Assign FYBBannerDelegate instance to handle banner events
FYBBanner.delegate = self;

/// 2. Define the banner placement ID
/// Replace banner placementId with your actual banner placement id
NSString *placementId = @"<#banner placementId#>";

/// 3. Initialize a new FYBBannerOptions instance with a specified placement ID
/// and size. FYBBannerSizeSmart automatically adjusts the banner size based on
/// the device's screen width.
FYBBannerOptions *bannerOptions =
    [[FYBBannerOptions alloc] initWithPlacementId:placementId
                                             size:FYBBannerSizeSmart];

/// 4. Request to load a banner ad with the specified options. This method
/// fetches the banner creative but does not show it.
[FYBBanner requestWithOptions:bannerOptions];
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
This feature is not available on Unity.
{% endtab %}
{% endtabs %}

### Adaptive Banners

By enabling the adaptive banner feature, you can receive the best banner size based on the ad width and screen size. **This feature is currently supported by Google AdMob, Google Bidding, and Google Ad Manager only**. This feature is disabled by default.

Networks that support adaptive banners will return ads with the best-fit height based on your banner size. Other networks will continue to deliver banners according to the specified ad size.

To use this feature, add the `adaptive` flag when defining your banner size using the code below:

{% tabs %}
{% tab title="Android" %}
{% code title="Kotlin" %}

```kotlin
val bannerOptions = BannerOptions().setAdaptive(true)
val placementId = "12345"
Banner.show(placementId, bannerOptions, activity)
```

{% endcode %}

{% code title="Java" %}

```java
BannerOptions bannerOptions = new BannerOptions().setAdaptive(true);
String placementId = "12345";
Banner.show(placementId, bannerOptions, activity);
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
let view: UIView = parent!.navigationController!.tabBarController!.view
let placementId = "12345"
let options = FYBBannerOptions(placementId: placementId, position: .bottom)
options.adaptive = true
FYBBanner.show(in: view, options: options)
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
NSString *placementId = @"12345";
FYBBannerOptions *options =
    [[FYBBannerOptions alloc] initWithPlacementId:placementId
                                         position:FYBBannerAdViewPositionTop];
options.adaptive = YES;
[FYBBanner showBannerInView:view options:options];
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
This feature is not available on Unity.
{% endtab %}
{% endtabs %}

### Adding Callbacks

The callback code below is required for the SDK to properly track the activity of your ad.

{% tabs %}
{% tab title="Android" %}
{% code title="Kotlin" %}

```kotlin
Banner.setBannerListener(object : BannerListener {
    override fun onError(placementId: String, error: BannerError) {
        // Called when an error arises when showing the banner from placement 'placementId'
    }

    override fun onLoad(placementId: String) {
        // Called when the banner from placement 'placementId' is successfully loaded
    }

    override fun onShow(placementId: String, impressionData: ImpressionData) {
        // Called when the banner from placement 'placementId' is shown
    }

    override fun onClick(placementId: String) {
        // Called when the banner from placement 'placementId' is clicked
    }

    override fun onRequestStart(placementId: String, requestId: String) {
        // Called when the banner from placement 'placementId' is going to be requested
        // 'requestId' identifies the request across the whole request/show flow
    }
})
```

{% endcode %}

{% code title="Java" %}

```java
Banner.setBannerListener(new BannerListener() {
    @Override
    public void onError(String placementId, BannerError error) {
        // Called when an error arises when showing the banner from placement 'placementId'
    }

    @Override
    public void onLoad(String placementId) {
        // Called when the banner from placement 'placementId' is successfully loaded
    }

    @Override
    public void onShow(String placementId, ImpressionData impressionData) {
        // Called when the banner from placement 'placementId' is shown
    }

    @Override
    public void onClick(String placementId) {
        // Called when the banner from placement 'placementId' is clicked
    }

    @Override
    public void onRequestStart(String placementId, String requestId) {
        // Called when the banner from placement 'placementId' is going to be requested
        // 'requestId' identifies the request across the whole request/show flow
    }
});
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
class MyBannerDelegate: NSObject, FYBBannerDelegate {
    func bannerDidLoad(_ banner: FYBBannerAdView, impressionData: FYBImpressionData) {}
    func bannerDidFail(toLoad placementId: String,     withError error: Error) {}
    func bannerDidShow(_ banner: FYBBannerAdView, impressionData: FYBImpressionData) {}
    func bannerDidClick(_ banner: FYBBannerAdView){}
    func bannerWillPresentModalView(_ banner: FYBBannerAdView) {}
    func bannerDidDismissModalView(_ banner: FYBBannerAdView) {}
    func bannerWillLeaveApplication(_ banner: FYBBannerAdView) {}
    func banner(_ banner: FYBBannerAdView, didResizeToFrame frame: CGRect) {}
    func bannerWillRequest(_ placementId: String, withRequestId requestId: String) {} }
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
#import FairBidSDK/FairBid.h
@interface MyBannerDelegate : NSObject
@end @implementation MyBannerDelegate
- (void)bannerDidLoad:(FYBBannerAdView *)banner impressionData:(FYBImpressionData *)impressionData {
// Called when an ad is loaded
}

- (void)bannerDidFailToLoad:(NSString *)placementId withError:(NSError *)error {
// Called when an error arises when loading an ad
}

- (void)bannerDidShow:(FYBBannerAdView *)banner impressionData:(FYBImpressionData *)impressionData {
// Called when banner shows up
}

- (void)bannerDidClick:(FYBBannerAdView *)banner {
// Called when banner is clicked
}

- (void)bannerWillPresentModalView:(FYBBannerAdView *)banner {
// Called when banner presents modal view
}

- (void)bannerDidDismissModalView:(FYBBannerAdView *)banner {
// Called when banner hides presented modal view
}

- (void)bannerWillLeaveApplication:(FYBBannerAdView *)banner {
// Called after banner redirects to other application
}

- (void)banner:(FYBBannerAdView *)banner didResizeToFrame:(CGRect)frame {
// Called after banner changes its size to desired frame
}

- (void)bannerWillRequest:(NSString *)placementId withRequestId:(NSString *)requestId  {
// Called when a banner is going to be requested.
}

@end
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
public class MyBannerListener : BannerListener
{
    public void OnError(string placementId, string error)
    {
        // Called when an error from placement 'placementId' arises when loading an ad
    }

    public void OnLoad(string placementId)
    {
        // Called when an ad from placement 'placementId' is loaded
    }

    public void OnShow(string placementId, ImpressionData impressionData)
    {
        // Called when banner from placement 'placementId' shows up
    }
    public void OnClick(string placementId)
    {
        // Called when banner from placement 'placementId' is clicked
    }

    public void OnRequestStart(string placementId)
    {
        // Called when a banner from placement 'placementId' is going to be requested
    }
}

Banner.SetBannerListener(new MyBannerListener());
```

{% endcode %}
{% endtab %}
{% endtabs %}


# Interstitial Ads

Interstitials are either static or video ads presented before, during or after the user interacts with your app. The user can view and then immediately dismiss them. This is a non-rewarded format for the user.

{% hint style="info" %}
The speed and stability of a user's internet connections may vary. It is highly recommended to fetch as much in advance of showing an ad as possible. This helps to ensure that all necessary assets are downloaded. For example, you may want to fetch an ad when a level starts or after a previous ad has been shown.
{% endhint %}

### Making the Request

Below is an example of making a request for an Intersitial.

{% tabs %}
{% tab title="Android" %}
{% code title="Kotlin" %}

```kotlin
import com.fyber.fairbid.ads.Interstitial

val placementId = "12345"
Interstitial.request(placementId)
```

{% endcode %}

{% code title="Java" %}

```java
import com.fyber.fairbid.ads.Interstitial;

String placementId = "12345";
Interstitial.request(placementId);
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
FYBInterstitial.delegate = MyInterstitialDelegate()
let placementId = "1234"
FYBInterstitial.request(placementId)
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
#import <FairBidSDK/FairBid.h>
FYBInterstitial.delegate = [[MyInterstitialDelegate alloc] init];
NSString *placementId = @"1234";
[FYBInterstitial request:placementId];
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
string placementId = "1234";
Interstitial.Request(placementId);
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Adding Callbacks

The callback code below is required for the SDK to properly track the activity of your ad

{% tabs %}
{% tab title="Android" %}
{% code title="Kotlin" %}

```kotlin
Interstitial.setInterstitialListener(object : InterstitialListener {
    override fun onShow(placementId: String, impressionData: ImpressionData) {
        // Called when the interstitial from placement 'placementId' shows up.
        // In case the ad is a video, audio play will start here.
    }

    override fun onClick(placementId: String) {
        // Called when the interstitial from placement 'placementId' is clicked
    }

    override fun onHide(placementId: String) {
        // Called when the interstitial from placement 'placementId' hides.
        // In case the ad is a video, audio play will stop here.
    }

    override fun onShowFailure(placementId: String, impressionData: ImpressionData) {
        // Called when an error arises when showing the interstitial from placement 'placementId'
    }

    override fun onAvailable(placementId: String) {
        // Called when an interstitial from placement 'placementId' becomes available
    }

    override fun onUnavailable(placementId: String) {
        // Called when an interstitial from placement 'placementId' becomes unavailable
    }

    override fun onRequestStart(placementId: String, requestId: String) {
        // Called when an interstitial from placement 'placementId' is going to be requested
        // 'requestId' identifies the request across the whole request/show flow
    }
})
```

{% endcode %}

{% code title="Java" %}

```java
Interstitial.setInterstitialListener(new InterstitialListener() {
    @Override
    public void onShow(String placementId, ImpressionData impressionData) {
        // Called when the interstitial from placement 'placementId' shows up.
        // In case the ad is a video, audio play will start here.
    }

    @Override
    public void onClick(String placementId) {
        // Called when the interstitial from placement 'placementId' is clicked
    }

    @Override
    public void onHide(String placementId) {
        // Called when the interstitial from placement 'placementId' hides.
        // In case the ad is a video, audio play will stop here.
    }

    @Override
    public void onShowFailure(String placementId, ImpressionData impressionData) {
        // Called when an error arises when showing the interstitial from placement 'placementId'
    }

    @Override
    public void onAvailable(String placementId) {
        // Called when a interstitial from placement 'placementId' becomes available
    }

    @Override
    public void onUnavailable(String placementId) {
        // Called when a interstitial from placement 'placementId' becomes unavailable
    }

  	@Override
    public void onRequestStart(String placementId, String requestId) {
        // Called when a interstitial from placement 'placementId' is going to be requested
        // 'requestId' identifies the request across the whole request/show flow
    }
});
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
class MyInterstitialDelegate: NSObject, FYBInterstitialDelegate {

    func interstitialIsAvailable(_ placementId: String) {}

    func interstitialIsUnavailable(_ placementId: String) {}

    func interstitialDidShow(_ placementId: String, impressionData: FYBImpressionData) {}

    func interstitialDidFail(toShow placementId: String, withError error: Error, impressionData: FYBImpressionData) {}

    func interstitialDidClick(_ placementId: String) {}

    func interstitialDidDismiss(_ placementId: String) {}

    func interstitialWillRequest(_ placementId: String, withRequestId requestId: String) {}

}
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
#import <FairBidSDK/FairBid.h>

@interface MyInterstitialDelegate : NSObject

@end

@implementation MyInterstitialDelegate

- (void)interstitialIsAvailable:(NSString *)placementId {
//    Called when an Interstitial from placement becomes available
}

- (void)interstitialIsUnavailable:(NSString *)placementId {
//    Called when an Interstitial from placement becomes unavailable
}

- (void)interstitialDidShow:(NSString *)placementId impressionData:(FYBImpressionData *)impressionData {
//    Called when an Interstitial from placement shows up.
//    In case the ad is a video, audio play will start here.
}

- (void)interstitialDidFailToShow:(NSString *)placementId withError:(NSError *)error impressionData:(FYBImpressionData *)impressionData {
//    Called when an error arises when showing an Interstitial from placement
}

- (void)interstitialDidClick:(NSString *)placementId {
//    Called when an Interstitial from placement is clicked
}

- (void)interstitialDidDismiss:(NSString *)placementId {
//    Called when an Interstitial from placement hides.
//    In case the ad is a video, audio play will stop here.
}

- (void)interstitialWillRequest:(NSString *)placementId withRequestId:(NSString *)requestId {
//    Called when an Interstitial is going to be requested.
}

@end.
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
public class MyInterstitialListener : InterstitialListener
{

    public void OnShow(string placementId, ImpressionData impressionData)
    {
        // Called when an Interstitial from placement 'placementId' shows up.
        // In case the ad is a video, audio play will start here.
        // On Android, this callback might be called only once the ad is closed.
    }

    public void OnClick(string placementId)
    {
        // Called when an Interstitial from placement 'placementId' is clicked
    }

    public void OnHide(string placementId)
    {
        // Called when an Interstitial from placement 'placementId' hides.
    }

    public void OnShowFailure(string placementId, ImpressionData impressionData)
    {
        // Called when an error arises when showing an Interstitial from placement 'placementId'
    }

    public void OnAvailable(string placementId)
    {
        // Called when an Interstitial from placement 'placementId' becomes available
    }

    public void OnUnavailable(string placementId)
    {
        // Called when an Interstitial from placement 'placementId' becomes unavailable
    }

    public void OnRequestStart(string placementId)
    {
        // Called when an Interstitial from placement 'placementId' is going to be requested
    }
}

Interstitial.SetInterstitialListener(new MyInterstitialListener());
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Example Showing an Ad

The following example checks to see if a Placement is available and if it is, uses the show request to display the ad.

{% tabs %}
{% tab title="Android" %}
{% code title="Kotlin" %}

```kotlin
val placementId = "12345"
if (Interstitial.isAvailable(placementId)) {
    Interstitial.show(placementId, context)
}
```

{% endcode %}

{% code title="Java" %}

```java
String placementId = "12345";
if (Interstitial.isAvailable(placementId)) {
    Interstitial.show(placementId, context);
}
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
let placementId = "1234"
if (FYBInterstitial.isAvailable(placementId)) {
    FYBInterstitial.show("placementId")
}
if (FYBInterstitial.isAvailable(placementId)) {
    let showOptions = FYBShowOptions()
    showOptions.viewController = self.myViewController
    FYBInterstitial.show(placementId, options: showOptions)
}
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
NSString *placementId = @"1234";
if ([FYBInterstitial isAvailable:placementId]) {
    [FYBInterstitial show:placementId];
}

if ([FYBInterstitial isAvailable:placementId]) {
    FYBShowOptions *showOptions = [FYBShowOptions new];
    showOptions.viewController = self.myViewController;
    [FYBInterstitial show:placementId options:showOptions];
}swif
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% hint style="warning" %}
If your game needs to be paused before showing an ad (e.g., stop audio playback), this is the best moment to do so.

The time between calling this API and the ad actually being shown should be negligible.

This approached is preferable compared to relying on the 'OnShow' callback since on Android, we cannot guarantee it will be called before the ad starts playing.
{% endhint %}

{% code title="C#" %}

```csharp
string placementId = "1234";

if (Interstitial.IsAvailable(placementId)) {
	Interstitial.Show(placementId);
}
```

{% endcode %}
{% endtab %}
{% endtabs %}


# Rewarded Ads

Rewarded ads are an engaging ad format that shows a short video ad to the user and in exchange the user will earn a reward. The user must consent and watch the video completely through to the end in order to earn the reward.

{% hint style="info" %}
The speed and stability of users internet connections may vary. It is highly recommended to fetch as far in advance of showing an ad as possible. This helps to ensure that all necessary assets are downloaded. For example, you may want to fetch an ad when a level starts, or after a previous ad has been shown.
{% endhint %}

### Making the Request

The following example shows how to make a request to display the Rewarded ads.

{% tabs %}
{% tab title="Android" %}
Before you can make a request to display a Rewarded ad, you must import the Rewarded class.

{% code title="Kotlin" %}

```kotlin
import com.fyber.fairbid.ads.Rewarded
```

{% endcode %}

{% code title="Java" %}

```java
import com.fyber.fairbid.ads.Rewarded;
```

{% endcode %}

After importing the Rewarded class, you must make a request to display the Rewarded ads.

{% code title="Kotlin" %}

```kotlin
import com.fyber.fairbid.ads.Rewarded

val placementId = "12345"
Rewarded.request(placementId)
```

{% endcode %}

{% code title="Java" %}

```java
import com.fyber.fairbid.ads.Rewarded;

String placementId = "12345";
Rewarded.request(placementId);
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
FYBRewarded.delegate = MyRewardedDelegate()
let placementId = "1234"
FYBRewarded.request(placementId)/code
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
FYBRewarded.delegate = MyRewardedDelegate()
let placementId = "1234"
FYBRewarded.request(placementId)
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
string placementId = "1234";

Rewarded.Request(placementId);
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Adding Callbacks

The callback code below is required for SDK to track the activity of your ad properly.

{% tabs %}
{% tab title="Android" %}
{% code title="Kotlin" %}

```kotlin
Rewarded.setRewardedListener(object : RewardedListener {
    override fun onShow(placementId: String, impressionData: ImpressionData) {
        // Called when the rewarded ad from placement 'placementId' shows up.
        // In case the ad is a video, audio play will start here.
    }

    override fun onClick(placementId: String) {
        // Called when the rewarded ad from placement 'placementId' is clicked
    }

    override fun onHide(placementId: String) {
        // Called when the rewarded ad from placement 'placementId' hides.
        // In case the ad is a video, audio play will stop here.
    }

    override fun onShowFailure(placementId: String, impressionData: ImpressionData) {
        // Called when an error arises when showing the rewarded ad from placement 'placementId'
    }

    override fun onAvailable(placementId: String) {
        // Called when a rewarded ad from placement 'placementId' becomes available
    }

    override fun onUnavailable(placementId: String) {
        // Called when a rewarded ad from placement 'placementId' becomes unavailable
    }

    override fun onCompletion(placementId: String, userRewarded: Boolean) {
        // Called when a rewarded ad from placement 'placementId' finishes playing
    }

    override fun onRequestStart(placementId: String, requestId: String) {
        // Called when a rewarded ad from placement 'placementId' is going to be requested
        // 'requestId' identifies the request across the whole request/show flow
    }
})
```

{% endcode %}

{% code title="Java" %}

```java
Rewarded.setRewardedListener(new RewardedListener() {
    @Override
    public void onShow(String placementId, ImpressionData impressionData) {
        // Called when the rewarded ad from placement 'placementId' shows up. In case the ad is a video, audio play will start here.
    }

    @Override
    public void onClick(String placementId) {
        // Called when the rewarded ad from placement 'placementId' is clicked
    }

    @Override
    public void onHide(String placementId) {
        // Called when the rewarded ad from placement 'placementId' hides. In case the ad is a video, audio play will stop here.
    }

    @Override
    public void onShowFailure(String placementId, ImpressionData impressionData) {
        // Called when an error arises when showing the rewarded ad from placement 'placementId'
    }

    @Override
    public void onAvailable(String placementId) {
        // Called when a rewarded ad from placement 'placementId' becomes available
    }

    @Override
    public void onUnavailable(String placementId) {
        // Called when a rewarded ad from placement 'placementId' becomes unavailable
    }

    @Override
    public void onCompletion(String placementId, boolean userRewarded) {
        // Called when a rewarded ad from placement 'placementId' finishes playing
    }

    @Override
    public void onRequestStart(String placementId, String requestId) {
        // Called when a rewarded ad from placement 'placementId' is going to be requested
        // 'requestId' identifies the request across the whole request/show flow
    }
});
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
class MyRewardedDelegate: NSObject, FYBRewardedDelegate {

    func rewardedIsAvailable(_ placementName: String) {}

    func rewardedIsUnavailable(_ placementName: String) {}

    func rewardedDidShow(_ placementName: String, impressionData: FYBImpressionData) {}

    func rewardedDidFail(toShow placementName: String, withError error: Error, impressionData: FYBImpressionData) {}

    func rewardedDidClick(_ placementName: String) {}

    func rewardedDidComplete(_ placementName: String, userRewarded: Bool) {}

    func rewardedDidDismiss(_ placementName: String) {}

    func rewardedWillRequest(_ placementId: String, withRequestId requestId: String) {}

}
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
#import <FairBidSDK/FairBid.h>

@interface MyRewardedDelegate : NSObject

@end

@implementation MyRewardedDelegate

- (void)rewardedIsAvailable:(NSString *)placementId {
//    Called when a rewarded ad from placement becomes available
}

- (void)rewardedIsUnavailable:(NSString *)placementId {
//    Called when a rewarded ad from placement becomes unavailable
}

- (void)rewardedDidShow:(NSString *)placementId impressionData:(FYBImpressionData *)impressionData {
//    Called when a rewarded ad from placement shows up. Audio play will start here.
}

- (void)rewardedDidFailToShow:(NSString *)placementId withError:(NSError *)error impressionData:(FYBImpressionData *)impressionData {
//    Called when an error arises when showing a rewarded ad from placement
}

- (void)rewardedDidClick:(NSString *)placementId {
//    Called when a rewarded ad from placement is clicked
}

- (void)rewardedDidDismiss:(NSString *)placementId {
//    Called when a rewarded ad from placement hides. Audio play will stop here.
}

- (void)rewardedDidComplete:(NSString *)placementId userRewarded:(BOOL)userRewarded {
//    Called when a rewarded ad finishes playing
}

- (void)rewardedWillRequest:(NSString *)placementId withRequestId:(NSString *)requestId {
//    Called when a rewarded ad is going to be requested.
}

@end
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
public class MyRewardedListener : RewardedListener
{
    public void OnShow(string placementId, ImpressionData impressionData)
    {
        // Called when a rewarded ad from placementId shows up. In case the ad is a video, audio play will start here.
        // On Android, this callback might be called only once the ad is closed.
    }

    public void OnClick(string placementId)
    {
        // Called when a rewarded ad from placement 'placementId' is clicked
    }

    public void OnHide(string placementId)
    {
        // Called when a rewarded ad from placement 'placementId' hides.
    }

    public void OnShowFailure(string placementId, ImpressionData impressionData)
    {
        // Called when an error arises when showing a rewarded ad from placement 'placementId'
    }

    public void OnAvailable(string placementId)
    {
        // Called when a rewarded ad from placement 'placementId' becomes available
    }

    public void OnUnavailable(string placementId)
    {
        // Called when a rewarded ad from placement 'placementId' becomes unavailable
    }

    public void OnCompletion(string placementId, bool userRewarded)
    {
        // Called when a rewarded ad from placement 'placementId' finishes playing.
        // In case the ad is a video, audio play will stop here.
    }

    public void OnRequestStart(string placementId)
    {
        // Called when a rewarded ad from placement 'placementId' is going to be requested
    }
}

Rewarded.SetRewardedListener(new MyRewardedListener());
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Example showing an ad

The following example checks to see if a placement is available and, if it is, uses the show request to display the ad.

{% tabs %}
{% tab title="Android" %}
{% code title="Kotlin" %}

```kotlin
val placementId = "12345"
if (Rewarded.isAvailable(placementId)) {
    Rewarded.show(placementId, context)
}
```

{% endcode %}

{% code title="Java" %}

```java
val placementId = "12345"
if (Rewarded.isAvailable(placementId)) {
    Rewarded.show(placementId, context)
}
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
let placementId = "1234"
if (FYBRewarded.isAvailable(placementId)) {
    FYBRewarded.show(placementId)
}
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
NSString *placementId = @"1234";
if ([FYBRewarded isAvailable:placementId]) {
    [FYBRewarded show:placementId];
}
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% hint style="warning" %}
If your game needs to be paused before showing an ad (e.g., stop audio playback), this is the best moment to do so. The time between calling this API and the ad actually being shown should be negligible. This approach is preferable to relying on the 'OnShow' callback since, we cannot guarantee it will be called on Android before the ad starts playing.
{% endhint %}

{% code title="C#" %}

```csharp
string placementId = "1234";

if (Interstitial.IsAvailable(placementId)) {
	Interstitial.Show(placementId);
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Server-Side Rewarding

{% tabs %}
{% tab title="Android" %}
Refer to the provided documentation for detailed instructions on configuring [Server-Side Rewarding](/dt-fairbid/advanced-configurations/server-side-rewarding).
{% endtab %}

{% tab title="iOS" %}
Refer to the provided documentation for detailed instructions on configuring [Server-Side Rewarding](/dt-fairbid/advanced-configurations/server-side-rewarding).
{% endtab %}

{% tab title="Unity" %}
{% hint style="warning" %}
When using Unity, due to technical limitations on the framework side, we notice that for some very low percentage of users, we receive the OnShowFailure followed by the OnCompletion(true). We're currently working on fixing the issue. However, in the meantime, if you're using client-side rewarding and you consider the OnShowFailure as a callback to trigger a new request and unblock your game's logic, we recommend you delay this check with the following workaround:
{% endhint %}

{% code title="C#" %}

```csharp
using System.Collections;

public class RewardedScene : MonoBehaviour, RewardedListener
{
    private bool CompletionEventReceived;

    private void ShowVideo()
    {
        // Reset the completion event flag
        this.CompletionEventReceived = false;

        // Show rewarded video with a specific placement ID
        Rewarded.Show("your_placement_id");
    }

    private void OnShowFailure()
    {
        // Start a coroutine to wait for user completion
        this.StartCoroutine(this.WaitUserCompletion());
    }

    private void OnCompletion(bool userRewarded)
    {
        // Mark the completion event as received
        this.CompletionEventReceived = true;

        if (userRewarded)
        {
            // Credit the user
        }
        else
        {
            // Handle the case where the user was not rewarded
            this.UserNotRewarded();
        }
    }

    private IEnumerator WaitUserCompletion()
    {
        // Delay the check for 1 second, giving enough time to receive the OnCompletion callback
        yield return new WaitForSeconds(1);

        // If the completion event was not received, handle it
        if (!this.CompletionEventReceived)
        {
            this.UserNotRewarded();
        }
    }

    private void UserNotRewarded()
    {
        // Handle your logic for users who didn't complete the rewarded ad
    }
}
```

{% endcode %}
{% endtab %}
{% endtabs %}


# Medium Rectangle Ads

Medium Rectangle (MREC) ads are 300x250 sized ads, serving both static and video, and positioned within editorial content of the app. There is no close button on MREC ads, and they are not skippable. Similar to Banner ads, MREC ads are refreshed according to a set refresh rate of between 10-120 seconds.

{% hint style="info" %}
MREC Ads are available from FairBid SDK version 3.33.1.
{% endhint %}

### Showing an MREC

Implement the code below to show an MREC:

{% tabs %}
{% tab title="Android" %}
{% code title="Kotlin" %}

```kotlin
fun showBanner() {
    val bannerOptions = BannerOptions().withSize(BannerSize.MREC)
            // if you don't specify your container view,
            // we'll display it at the bottom of the screen
            .placeInContainer(YOUR_CONTAINER_VIEW_GOES_HERE)
    Banner.show("placementId", bannerOptions, activity)
}
```

{% endcode %}

{% code title="Java" %}

```java
private void showBanner() {
    BannerOptions bannerOptions = new BannerOptions().withSize(BannerSize.MREC)
        // if you don't specify your container view,
        // we'll display it at the bottom of the screen
        .placeInContainer(YOUR_CONTAINER_VIEW_GOES_HERE);
    Banner.show("placementId", bannerOptions, activity);
}
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
Implement the code below to request an MREC:

{% code title="Swift" %}

```swift
 FYBBanner.delegate = MyBannerDelegate()
    let bannerOptions = FYBBannerOptions(placementId: "1234", size: .MREC)
    FYBBanner.request(with: options)
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
#import <FairBidSDK/FairBid.h>

      FYBBanner.delegate = [[MyBannerDelegate alloc] init];
      NSString *placementId = @"1234";
      FYBBannerOptions *bannerOptions = [[FYBBannerOptions alloc] initWithPlacementId:@"1234" size:FYBBannerSizeMREC];
      [FYBBanner requestWithOptions:bannerOptions];
```

{% endcode %}

To show an MREC ad, display the view received in the `bannerDidLoad:impressionData:` that’s part of `FYBBannerDelegate` protocol.

{% code title="Swift" %}

```swift
extension MyViewController: FYBBannerDelegate {

    func bannerDidLoad(_ banner: FYBBannerAdView, impressionData: FYBImpressionData)
    {
      // set up the MREC banner constraints
       myView.addSubview(banner)
       banner.center = CGPoint(x: myView.frame.width / 2, y: myView.center.y)
    }

    …
}
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
// in implementation of FYBBannerDelegate protocol

- (void)bannerDidLoad:(FYBBannerAdView *)banner impressionData:(FYBImpressionData *)impressionData {
    [self.myView addSubview:banner];
    banner.center = CGPointMake(self.myView.bounds.size.width / 2, self.bounds.size.height / 2);
}
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
This feature is not available on Unity.
{% endtab %}
{% endtabs %}


# SDK Reference

{% content-ref url="/pages/jWkDNuUDlrN8vpNig8Fz" %}
[Mediation Started Callback](/dt-fairbid/fairbid-sdk/sdk-reference/mediation-started-callback)
{% endcontent-ref %}

{% content-ref url="/pages/b913efa4738425955bebad4885eb85451707dfb3" %}
[Advanced Initialization Options](/dt-fairbid/fairbid-sdk/sdk-reference/advanced-initialization-options)
{% endcontent-ref %}

{% content-ref url="/pages/aed26bbc446db54e323b10481773baf0782b4e65" %}
[Ad Audio](/dt-fairbid/fairbid-sdk/sdk-reference/ad-audio)
{% endcontent-ref %}

{% content-ref url="/pages/c2b2bb8a6f49875deb683ee4559cff390c918627" %}
[Auto Request](/dt-fairbid/fairbid-sdk/sdk-reference/auto-request)
{% endcontent-ref %}

{% content-ref url="/pages/e32950510ae7cec060534142c77d631029f2bf3d" %}
[GDPR](/dt-fairbid/fairbid-sdk/sdk-reference/gdpr)
{% endcontent-ref %}

{% content-ref url="/pages/823f6ce68aa2e7337415ff4c74f36b64180d7c19" %}
[CCPA - Privacy String](/dt-fairbid/fairbid-sdk/sdk-reference/ccpa-privacy-string)
{% endcontent-ref %}

{% content-ref url="/pages/d54cc4bd516e74c7cb23ed9fbe445bf67413e959" %}
[LGPD](/dt-fairbid/fairbid-sdk/sdk-reference/lgpd)
{% endcontent-ref %}

{% content-ref url="/pages/8e197438d0005ff5cb0ee85988b307301a5c3790" %}
[Custom Parameters When Showing an Ad](/dt-fairbid/fairbid-sdk/sdk-reference/custom-parameters-when-showing-an-ad)
{% endcontent-ref %}

{% content-ref url="/pages/b6e7644278b6d6acc645cbc7ba50eb478c4a2aee" %}
[Impression Level Data](/dt-fairbid/fairbid-sdk/sdk-reference/impression-level-data)
{% endcontent-ref %}

{% content-ref url="/pages/fce6aeb15eb5835fea493e88c9467789af509f6f" %}
[User Settings](/dt-fairbid/fairbid-sdk/sdk-reference/user-settings)
{% endcontent-ref %}

{% content-ref url="/pages/e92697f912c1dd9327dfb753ff75b6f652d8c917" %}
[SKAdNetwork ID Auto Updater](/dt-fairbid/fairbid-sdk/sdk-reference/skadnetwork-id-auto-updater)
{% endcontent-ref %}

{% content-ref url="/pages/Dfp19hZBEjvvDrWF1Ihp" %}
[Enabling DT Offer Wall](/dt-fairbid/fairbid-sdk/sdk-reference/enabling-dt-offer-wall)
{% endcontent-ref %}


# Mediation Started Callback

DT FairBid provides access to initialization information about FairBid itself and each of the integrated third-party networks (mediated networks).

Run the following API to set up a single listener that monitors mediation events, confirms network readiness, and efficiently handles initialization in your app.

For more detailed initialization information for each mediated network, see [Tracking Network Initialization](#tracking-network-initialization).

{% tabs %}
{% tab title="Android" %}
{% code title="Kotlin" %}

```kotlin
fairBid.withFairBidListener(object : FairBidListener {
            override fun mediationFailedToStart(errorMessage: String, errorCode: Int) {
                // The SDK was unable to start any of the mediated networks.
                // That includes DT-X
                // Nothing to do. Contact support if this error persists (errorCode will be used to troubleshoot the problem)
            }

            override fun mediationStarted() {
                // FairBid is ready to mediate.
                // TPNs that need to be started as early as possible have been started
            }

            override fun onNetworkFailedToStart(network: MediatedNetwork, errorMessage: String) {
                // A specific network failed to start.
            }

            override fun onNetworkStarted(network: MediatedNetwork) {
                // A specific network started successfully.
            }

        })

```

{% endcode %}

{% code title="Java" %}

```java
FairBid.configureForAppId("AppId").withFairBidListener(new FairBidListener() {
    @Override
    public void mediationFailedToStart(String errorMessage, int errorCode) {
        // The SDK was unable to start any of the mediated networks.
        // That includes DT-X
        // Nothing to do. Contact support if this error persists (errorCode will be used to troubleshoot the problem)
    }

    @Override
    public void mediationStarted() {
        // FairBid is ready to mediate.
        // TPNs that need to be started as early as possible have been started
    }

    @Override
    public void onNetworkFailedToStart(MediatedNetwork network, String errorMessage) {
        // A specific network failed to start.
    }

    @Override
    public void onNetworkStarted(MediatedNetwork network) {
        // A specific network started successfully.
    }
});}    
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
class MyDelegate: FairBidDelegate {
    func networkStarted(_ network: FYBMediatedNetwork) {
        // A specific network started successfully.
    }
    func network(_ network: FYBMediatedNetwork, failedToStartWithError error: Error) {
        // A specific network failed to start.
    }
    
    func mediationStarted() {
        // FairBid is ready to mediate.
        // TPNs that need to be started as early as possible have been started
    }
    
    func mediationFailedToStartWithError(_ error: Error) {
        // The SDK was unable to start any of the mediated networks.
        // That includes DT-X
        // Nothing to do.
        // Contact support if this error persists (errorCode will be used to troubleshoot the problem)
    }
}
}
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
@interface MyDelegate: NSObject

@end

@implementation MyDelegate
- (void)networkStarted:(FYBMediatedNetwork)network {
    // A specific network started successfully.
}
- (void)network:(FYBMediatedNetwork)network failedToStartWithError:(NSError *)error {
    // A specific network failed to start.
}
- (void)mediationStarted {
    // FairBid is ready to mediate.
    // TPNs that need to be started as early as possible have been started
}
- (void)mediationFailedToStartWithError:(NSError *)error {
    // The SDK was unable to start any of the mediated networks.
    // That includes DT-X
    // Nothing to do. 
    // Contact support if this error persists (errorCode will be used to troubleshoot the problem)
}
@end
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
public class MyListener : FairBidListener
{
    public void OnNetworkStarted(MediatedNetwork network)
    {
        // A specific network started successfully.
    }

    public void OnNetworkFailedToStart(MediatedNetwork network, string error)
    {
         // A specific network failed to start.
    }

    public void OnMediationStarted()
    {
        // FairBid is ready to mediate.
        // TPNs that need to be started as early as possible have been started
    }

    public void OnMediationFailedToStart(string error, string code)
    {
        // The SDK was unable to start any of the mediated networks.
        // That includes DT-X
        // Nothing to do. 
        // Contact support if this error persists (errorCode will be used to troubleshoot the problem)        

    }
}

FairBid.SetFairBidListener(new MyListener());
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Tracking Network Initialization

Mediated networks can be initialized either when FairBid starts or later when the first ad request is made (Lazy Start). With either initialization method, some networks provide an explicit callback to report whether network initialization was successful.

The following tables summarize whether Lazy Start is available for each network and the dedicated Start Success callback availability.

{% tabs %}
{% tab title="Andoid" %}

| MEDIATED NETWORK          | NAME IN CALLBACK |            LAZY START           |      START SUCCESS CALLBACK     |
| ------------------------- | ---------------- | :-----------------------------: | :-----------------------------: |
| AdMob/Google Bidding      | `ADMOB`          |                                 | <i class="fa-check">:check:</i> |
| Amazon Publisher Services | `AMAZON`         | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| Applovin                  | `APPLOVIN`       | <i class="fa-check">:check:</i> |                                 |
| BIGO Ads                  | `BIGOADS`        | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| Chartboost                | `CHARTBOOST`     | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| Google Ad Manager         | `GAM`            | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| HyprMX                    | `HYPRMX`         | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| InMobi                    | `INMOBI`         |                                 | <i class="fa-check">:check:</i> |
| IronSource                | `IRON_SOURCE`    | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| Liftoff Monetize          | `VUNGLE`         |                                 | <i class="fa-check">:check:</i> |
| Meta Audience Network     | `FACEBOOK`       | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| Mintegral                 | `MINTEGRAL`      |                                 | <i class="fa-check">:check:</i> |
| Ogury                     | `OGURY`          |                                 |                                 |
| Pangle                    | `PANGLE`         |                                 | <i class="fa-check">:check:</i> |
| Unity Ads                 | `UNITYADS`       | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| Verve Group               | `VERVE`          |                                 | <i class="fa-check">:check:</i> |
| {% endtab %}              |                  |                                 |                                 |

{% tab title="iOS" %}

| MEDIATED NETWORK          | NAME IN CALLBACK |            LAZY START           |      START SUCCESS CALLBACK     |
| ------------------------- | ---------------- | :-----------------------------: | :-----------------------------: |
| AdMob/Google Bidding      | `ADMOB`          |                                 | <i class="fa-check">:check:</i> |
| Amazon Publisher Services | `AMAZON`         | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| Applovin                  | `APPLOVIN`       | <i class="fa-check">:check:</i> |                                 |
| BIGO Ads                  | `BIGOADS`        | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| Chartboost                | `CHARTBOOST`     | <i class="fa-check">:check:</i> |                                 |
| Google Ad Manager         | `GAM`            | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| HyprMX                    | `HYPRMX`         | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| InMobi                    | `INMOBI`         |                                 | <i class="fa-check">:check:</i> |
| IronSource                | `IRON_SOURCE`    | <i class="fa-check">:check:</i> |                                 |
| Liftoff Monetize          | `VUNGLE`         |                                 | <i class="fa-check">:check:</i> |
| Meta Audience Network     | `FACEBOOK`       |                                 |                                 |
| Mintegral                 | `MINTEGRAL`      |                                 |                                 |
| Ogury                     | `OGURY`          |                                 |                                 |
| Pangle                    | `PANGLE`         |                                 | <i class="fa-check">:check:</i> |
| Unity Ads                 | `UNITYADS`       | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| Verve Group               | `VERVE`          |                                 | <i class="fa-check">:check:</i> |

{% hint style="info" %}
Apps built on iOS should support Lazy Start on all networks. However, if you have at least one Bidding instance, FairBid initializes the network immediately.
{% endhint %}
{% endtab %}

{% tab title="Unity - Android" %}

| MEDIATED NETWORK          | NAME IN CALLBACK |            LAZY START           |      START SUCCESS CALLBACK     |
| ------------------------- | ---------------- | :-----------------------------: | :-----------------------------: |
| AdMob/Google Bidding      | `ADMOB`          |                                 | <i class="fa-check">:check:</i> |
| Amazon Publisher Services | `AMAZON`         | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| Applovin                  | `APPLOVIN`       | <i class="fa-check">:check:</i> |                                 |
| BIGO Ads                  | `BIGOADS`        | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| Chartboost                | `CHARTBOOST`     | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| Google Ad Manager         | `GAM`            | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| HyprMX                    | `HYPRMX`         | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| InMobi                    | `INMOBI`         |                                 | <i class="fa-check">:check:</i> |
| IronSource                | `IRON_SOURCE`    | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| Liftoff Monetize          | `VUNGLE`         |                                 | <i class="fa-check">:check:</i> |
| Meta Audience Network     | `FACEBOOK`       | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| Mintegral                 | `MINTEGRAL`      |                                 | <i class="fa-check">:check:</i> |
| Ogury                     | `OGURY`          |                                 |                                 |
| Pangle                    | `PANGLE`         |                                 | <i class="fa-check">:check:</i> |
| Unity Ads                 | `UNITYADS`       | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| Verve Group               | `VERVE`          |                                 | <i class="fa-check">:check:</i> |
| {% endtab %}              |                  |                                 |                                 |

{% tab title="Unity - iOS" %}

| MEDIATED NETWORK          | NAME IN CALLBACK |            LAZY START           |      START SUCCESS CALLBACK     |
| ------------------------- | ---------------- | :-----------------------------: | :-----------------------------: |
| AdMob/Google Bidding      | `ADMOB`          |                                 | <i class="fa-check">:check:</i> |
| Amazon Publisher Services | `AMAZON`         | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| Applovin                  | `APPLOVIN`       | <i class="fa-check">:check:</i> |                                 |
| BIGO Ads                  | `BIGOADS`        | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| Chartboost                | `CHARTBOOST`     | <i class="fa-check">:check:</i> |                                 |
| Google Ad Manager         | `GAM`            | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| HyprMX                    | `HYPRMX`         | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| InMobi                    | `INMOBI`         |                                 | <i class="fa-check">:check:</i> |
| IronSource                | `IRON_SOURCE`    | <i class="fa-check">:check:</i> |                                 |
| Liftoff Monetize          | `VUNGLE`         |                                 | <i class="fa-check">:check:</i> |
| Meta Audience Network     | `FACEBOOK`       |                                 |                                 |
| Mintegral                 | `MINTEGRAL`      |                                 |                                 |
| Ogury                     | `OGURY`          |                                 |                                 |
| Pangle                    | `PANGLE`         |                                 | <i class="fa-check">:check:</i> |
| Unity Ads                 | `UNITYADS`       | <i class="fa-check">:check:</i> | <i class="fa-check">:check:</i> |
| Verve Group               | `VERVE`          |                                 | <i class="fa-check">:check:</i> |
| {% endtab %}              |                  |                                 |                                 |
| {% endtabs %}             |                  |                                 |                                 |


# Advanced Initialization Options

The following code examples describe how to configure advanced initialization options when you initialize the FairBid SDK for different use cases, such as enabling logs for debugging, disabling auto-requesting for ads or the collection and transmission of AAID, and flagging certain users as children.

{% tabs %}
{% tab title="Android" %}
{% code title="Kotlin" %}

```kotlin
FairBid.configureForAppId("your_app_id")
    .enableLogs()              // Enables logs for debugging
    .disableAutoRequesting()   // Disables auto-requesting of ads
    .disableAdvertisingId()    // Disables collection and transmission of AAID
    .setUserAChild()           // Flags certain users as children
    .start(context)
```

{% endcode %}

{% code title="Java" %}

```java
FairBid.configureForAppId("your_app_id")
    .enableLogs()              // Enable logs for debugging
    .disableAutoRequesting()   // Disable auto-requesting of ads
    .disableAdvertisingId()    // Disable collection and transmission of AAID
    .setUserAChild()           // Flag certain users as children
    .start(context);
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
let options = FYBStartOptions()
options.logLevel = .verbose
options.autoRequestingEnabled = false
options.isChild = true
FairBid.start(withAppId: "1234", options: options)
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
#import

FYBStartOptions *options = [[FYBStartOptions alloc] init];
options.logLevel = FYBLoggingLevelVerbose;
options.autoRequestingEnabled = NO;
options.isChild = YES;
[FairBid startWithAppId:@"1234" options:options];
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
FairBid.ConfigureForAppId("your_app_id")
       .EnableLogs()
       .DisableAutoRequesting()
       .DisableAdvertisingId()
       .SetIsChild(true)
       .Start();
```

{% endcode %}
{% endtab %}
{% endtabs %}

## App ID

In the initialization code above, you must replace the `your_app_id` value with your `App ID` and pass it as a string. To locate the DT App ID, log in to the [DT Console](https://console.fyber.com/login), and go to **Monetization→App Management**. The **Apps dashboard** displays a list of your apps, and App IDs display below each app name.

## Setting User as Child

This API enables publishers to flag certain users as children. The term children refers to individuals under a certain age, as defined under applicable data privacy laws. This API must be called before SDK initialization. For more information about flagging users as children, see [Flag End-Users as a Child](/dt-fairbid/privacy/flag-end-user-as-a-child).

{% tabs %}
{% tab title="Android" %}
{% code title="Java" %}

```java
setUserAChild
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
isChild
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
setIsChild
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Setting User Consent for Personalized Ads <a href="#h_01kfh5tgywkfhyepg5rt65mef1" id="h_01kfh5tgywkfhyepg5rt65mef1"></a>

This API allows publishers to indicate consent for delivering personalized ads from DT Exchange to specific mediated networks.

The usage of this API has the following effects:

* The consent information is forwarded to the mediated networks using their API. For more information, see the mediated networks that support this API below.
* The Google Advertising ID (GAID) is sent as a string of zeros when the FairBid auction request is performed.

By default, the FairBid SDK assumes consent is given.

{% tabs %}
{% tab title="Android" %}
{% code title="Java" %}

```java
/**  @param isConsentGiven   `true` if user gives the consent, `false` otherwise
*  @param context          application or activity context
*/
UserInfo.setPersonalizedAdsConsent(isConsentGiven, context)
```

{% endcode %}
{% endtab %}
{% endtabs %}

The following mediated networks support this API:

* **Meta Audience Network**: If the consent was rejected prior to FairBid start, the Meta adapter and the SDK do not initialize. If the consent was rejected after FairBid starts, Meta adapter is prevented from performing ad requests in the current session. If the consent was granted, there is no change in the adapter behavior.
* **Pangle**: Pangle SDK’s API for Personalized Advertising is called: `PAGConfig.setPAConsent(paConsent)`


# Ad Audio

If your app allows users to mute sound effects or music independently from the device volume controls, ensure a seamless audio experience by displaying ads that follow the same audio settings as your app. For example, if a user mutes sound effects or music in your app, display ads that are also muted.

Use the following API to mute the audio in ads:

{% tabs %}
{% tab title="Android" %}
{% code title="Kotlin" %}

```kotlin
FairBid.Settings.setMuted(true)
```

{% endcode %}

{% code title="Java" %}

```java
FairBid.Settings.setMuted(true);
```

{% endcode %}

If you wish to start the SDK with muted ads, make sure you call this API before starting the SDK:

{% code title="Kotlin" %}

```kotlin
FairBid.Settings.setMuted(true)
FairBid.start(appId, activity)
```

{% endcode %}

{% code title="Java" %}

```java
FairBid.Settings.setMuted(true);
FairBid.start(appId, activity);

```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
//getter
let isMuted = FairBid.settings().isMuted
//setter
FairBid.settings().isMuted = true
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
//getter
BOOL isMuted = FairBid.settings.isMuted;
//setter
FairBid.settings.muted = true;
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
using Fyber;

Settings.SetMuted(true);
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Ad Audio Networks <a href="#h_01jcdrtjbp0hgkt2spkzgftg5h" id="h_01jcdrtjbp0hgkt2spkzgftg5h"></a>

The following networks are compatible with the ad audio mute setting:

{% tabs %}
{% tab title="Android" %}

* AdMob/Google Bidding
* AppLovin
* DT Exchange (Interstitial only)
* InMobi
* Liftoff Monetize
* Mintegral
* Verve
  {% endtab %}

{% tab title="iOS" %}

* AdMob/Google Bidding
* AppLovin
* Chartboost
* DT Exchange (Interstitial only)
* Google Ad Manager
* InMobi
* Liftoff Monetize
* Mintegral
  {% endtab %}

{% tab title="Unity" %}
**Unity-Android:**

* AdMob/Google Bidding
* AppLovin
* DT Exchange (Interstitial only)
* InMobi
* Liftoff Monetize
* Mintegral
* Verve

**Unity-iOS:**

* AdMob/Google Bidding
* AppLovin
* Chartboost
* DT Exchange (Interstitial only)
* InMobi
* Liftoff Monetize
* Mintegral
* Verve
  {% endtab %}
  {% endtabs %}

{% hint style="info" %}

* The ad audio mute setting does not affect ads from networks that are not listed above or programmatic ads rendered by DT FairBid.
* For ads from AdMob/Google Bidding and DT Exchange, apply the mute setting **before** the ad is requested. If an ad is already loaded on the device before the user mutes the sound in the application (which applies the ad audio mute setting), the loaded ad still shows with audio.
  {% endhint %}


# Auto Request

The DT FairBid SDK includes an Auto Request feature that automatically manages ad availability. It allows you to request and replace ads efficiently, which minimizes wasted fills and optimizes device resource usage. When enabled, the SDK attempts to replace ads when a user finishes watching one and retries ad requests if a placement fails to secure a fill.

Auto Requests balance ad availability, reduce unnecessary network calls, and maintain a smooth user experience. You can enable or disable auto-request globally or for individual placements as needed.

## Global Auto-Request Settings

Auto Requests are automatically activated when you configure the DT FairBid SDK, which does one of the following:

* When a user finishes watching an ad, DT FairBid attempts to replace it immediately.
* When a specific placement has trouble obtaining a fill—like when no traditional mediated network has available inventory, and no programmatic demand is bidding within a predetermined amount of time—DT FairBid restarts the ad request process at exponentially increasing time intervals to optimize the chances of getting a fill while minimizing the usage of device resources.

{% hint style="warning" %}
DT strongly recommends using the default behavior of DT FairBid. However, you can disable auto-request globally when you start the SDK.
{% endhint %}

To disable Auto Requests globally, use the following API:

{% tabs %}
{% tab title="Android" %}
{% code title="Java" %}

```java
FairBid.withConfiguration("12345")
       .disableAutoRequesting()
       .start(activity);
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
let options = FYBStartOptions()
options.autoRequestingEnabled = false
FairBid.start(withAppId: "1234", options: options)
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
FYBStartOptions *options = [[FYBStartOptions alloc] init];
 options.autoRequestingEnabled = NO;
[FairBid startWithAppId:@"1234" options:options];
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
FairBid fairbid = FairBid.ConfigureForAppId("appId")
    .DisableAutoRequesting()
    .Start();/code
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Placement Auto-Requests

You can enable or disable auto-requests for individual placements at any moment before or after starting the SDK. However, after you start the SDK, you cannot enable or disable auto requests for all placements with a single API call. You must enable or disable each placement individually.

### Enabling Placement Auto-Requests

Starting from DT FairBid SDK 3.8.0, you can have increased control over the availability of each placement while offloading the ad availability management to DT FairBid SDK.

{% hint style="info" %}
Even with auto-request enabled, you must request each placement you are interested in at least once.
{% endhint %}

#### Interstitial Ads

To enable auto request for specific interstitial ads, use the following API:

{% tabs %}
{% tab title="Android" %}
{% code title="Java" %}

```java
Interstitial.enableAutoRequesting("12345");
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
FYBInterstitial.enableAutoRequesting("12345")
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
[FYBInterstitial enableAutoRequesting:@"12345"];
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
Interstitial.EnableAutoRequesting("12345");
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### Rewarded Ads

To enable auto request for specific rewarded ads, use the following API:

{% tabs %}
{% tab title="Android" %}

<pre class="language-java" data-title="Java"><code class="lang-java"><strong>Rewarded.enableAutoRequesting("12345");
</strong></code></pre>

{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
FYBRewarded.enableAutoRequesting("12345")
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
[FYBRewarded enableAutoRequesting:@"12345"];
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
Rewarded.EnableAutoRequesting("12345");
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Disabling Placement Auto-Requests

If a user is past a stage in your app where a certain placement is no longer relevant, you can disable auto-request for that particular placement to avoid waste.

#### Interstitials Ads

To disable auto request for specific interstitial ads, use the following API:

{% tabs %}
{% tab title="Android" %}
{% code title="Java" %}

```java
Interstitial.disableAutoRequesting("12345");
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
FYBInterstitial.enableAutoRequesting("12345")
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
[FYBInterstitial disableAutoRequesting:@"12345"];
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
Interstitial.DisableAutoRequesting("12345");
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### Rewarded Ads

To disable auto request for specific rewarded ads, use the following API:

{% tabs %}
{% tab title="Android" %}
{% code title="Java" %}

```java
Rewarded.disableAutoRequesting("12345");
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
Rewarded.disableAutoRequesting("12345");
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
[FYBRewarded disableAutoRequesting:@"12345"];
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
Rewarded.DisableAutoRequesting("12345");
```

{% endcode %}
{% endtab %}
{% endtabs %}


# GDPR

The General Data Protection Regulation ([GDPR](https://gdpr.eu/)) requires you to scope your user's consent. A user falls within the GDPR scope for your app when one more of the following applies:

* The user is currently located in the European Union (EU).
* The user registers with the app as an EU resident.
* The app specifically targets EU users.

For more information about how DT applies GDPR, see [GDPR](/dt-fairbid/privacy/gdpr).

DT recommends that the first time you gather a user's consent, pass it to the DT FairBid SDK before initializing it. The SDK considers the user's consent when initializing. For future sessions, call the API if the user updates their consent, as the SDK caches the consent.

{% hint style="warning" %}
If you do not pass the user's consent to the DT FairBid SDK, the SDK only shows contextual ads to that user, which might negatively reduce your revenue.
{% endhint %}

## User Consent Given

To indicate that the user gives consent, use the following API:

{% tabs %}
{% tab title="Android" %}
{% code title="Java" %}

```java
UserInfo.setGdprConsent(true, context);
      // true or YES if you have the user’s consent
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
FairBid.user().gdprConsent = true
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
[FairBid user].GDPRConsent = YES;
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
UserInfo.SetGdprConsent(true);
```

{% endcode %}
{% endtab %}
{% endtabs %}

## User Consent NOT Given

To indicate that the user does not give consent, use the following API:

{% tabs %}
{% tab title="Android" %}
{% code title="Java" %}

```java
UserInfo.setGdprConsent(false, context);
      // false or NOT if you do not have the user’s consent
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
DT does not support this option for iOS.
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
UserInfo.SetGdprConsent(false);
```

{% endcode %}
{% endtab %}
{% endtabs %}

## \[Optional] Additional User Consent String

To pass an optional consent string, use the following API:

{% tabs %}
{% tab title="Android" %}
{% code title="Java" %}

```java
String consentString = "BOEFEAyOEFEAyXXXXXXI4AAAB9vABAASA";
UserInfo.setGdprConsentString(consentString, this);
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
FairBid.user().gdprConsentString = "BOEFEAyOEFEAyXXXXXXI4AAAB9vABAASA"
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
[FairBid user].GDPRConsentString = @"BOEFEAyOEFEAyXXXXXXXI4AAAB9vABAASA";
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
var consentString = "BOEFEAyOEFEAyXXXXXXI4AAAB9vABAASA";
UserInfo.SetGdprConsentString(consentString);;
```

{% endcode %}
{% endtab %}
{% endtabs %}


# CCPA - Privacy String

The California Consumer Privacy Act of 2018 ([CCPA](https://iabtechlab.com/standards/ccpa/)) protects the personal information of California residents. It applies to all businesses operating in California. If a California resident uses an app developer's mobile app, CCPA applies to the developer and all relevant partners that process users' personal information.

## Setting the IAB US Privacy String

DT recommends that the first time you gather a user's opt-out (consent), pass it to the SDK before initializing it. The SDK considers the user's opt-out when initializing.

To set the IAB US privacy string using the following API:

{% tabs %}
{% tab title="Android" %}
{% code title="Java" %}

```java
String privacyString = "1YNN";
UserInfo.setIabUsPrivacyString(privacyString, context);
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
FairBid.user().iabusPrivacyString = "1YNN"
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
[FairBid user].IABUSPrivacyString = @"1YNN";
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
var privacyString = "1YNN";
    UserInfo.SetIabUsPrivacyString(privacyString);
```

{% endcode %}
{% endtab %}
{% endtabs %}

To determine what value to use for the US Privacy String, see [IAB US Privacy String](https://github.com/InteractiveAdvertisingBureau/USPrivacy/blob/master/CCPA/US%20Privacy%20String.md).

Valid values include:

* `1---`: CCPA does not apply, for example, the user is not a California resident.
* `1YNN`: User does NOT opt out, ad experience continues.
* `1YYN`: User opts out of targeted advertising.

## Clearing Privacy Opt-Out

To clear the user opt-out setting, use the following API:

{% tabs %}
{% tab title="Android" %}
{% code title="Java" %}

```java
UserInfo.clearIabUsPrivacyString(context);
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
FairBid.user().clearIABUSPrivacyString();
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
[[FairBid user] clearIABUSPrivacyString];
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
UserInfo.ClearIabUsPrivacyString();
```

{% endcode %}
{% endtab %}
{% endtabs %}


# LGPD

The Brazilian General Data Protection Law, the Lei Geral de Proteção de Dados Pessoais ([LGPD](https://www.gov.br/anpd/pt-br/centrais-de-conteudo/outros-documentos-e-publicacoes-institucionais/lgpd-en-lei-no-13-709-capa.pdf)), requires you to scope your user consent. The LGPD applies if any of the following is conditions are met:

* The user is currently located in Brazil.
* The user registers with the app as a Brazilian resident.
* The app specifically targets Brazilian users.

For more information about how DT applies LGDP, see [LGPD](/dt-fairbid/privacy/lgpd).

DT recommends that the first time you gather a user's consent, pass it to the DT FairBid SDK before initializing it. The SDK considers the user's consent when initializing. For future sessions, call the API if the user updates their consent, as the SDK caches the consent.

{% hint style="warning" %}
If you do not pass the user's consent to the DT FairBid SDK, the SDK only shows contextual ads to that user, which might negatively reduce your revenue.
{% endhint %}

## User Consent Given

To indicate that the user gives consent, use the following API:

{% tabs %}
{% tab title="Android" %}
{% code title="Java" %}

```java
UserInfo.setLgpdConsent(true, context);
      // true if you have the user’s consent
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
FairBid.user().setLGPDConsent = true
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
[FairBid user].setLGPDConsent = true;
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
UserInfo.SetLgpdConsent(true);
```

{% endcode %}
{% endtab %}
{% endtabs %}

## User Consent NOT Given

To indicate that the user does not give consent, use the following API:

{% tabs %}
{% tab title="Android" %}
{% code title="Java" %}

```java
UserInfo.setLgpdConsent(false, context);
      // false if you have the user’s consent
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
FairBid.user().setLGPDConsent = false
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
[FairBid user].setLGPDConsent = false;
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
UserInfo.SetLgpdConsent(false);
```

{% endcode %}
{% endtab %}
{% endtabs %}


# Custom Parameters When Showing an Ad

Custom parameters are user-defined data—such as demographics, ad category, or campaign details—which track ad completions. If your rewarding strategy is [Server-Side Rewarding](/dt-fairbid/advanced-configurations/server-side-rewarding), you can add these parameters with Interstitial or Rewarded ad completions to improve tracking and reporting accuracy in [User Level Reports](/dt-fairbid/reporting/reporting-api/dt-fairbid-user-level-reporting-api).

## Defining Custom Parameters <a href="#h_01jppza3xj47necyavt2qaf4hj" id="h_01jppza3xj47necyavt2qaf4hj"></a>

To define and implement custom parameters, use the following API:

{% tabs %}
{% tab title="Android" %}
{% code title="Java" %}

```java
public class ShowOptions {
    public void setCustomParameters(
        Map<String, String> customParameters) {}
}
public void show(
    @NonNull String placementId,
    final ShowOptions showOptions,
    final Activity activity) {}
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
open class FYBShowOptions : NSObject {
    open var customParameters: [String : String]?
}
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
public ShowOptions(Dictionary<string, string> customParameters)

public static void Show(string placementId, ShowOptions options)
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Interstitial Ads

To set custom parameters in Interstitial ads, use the following API:

{% tabs %}
{% tab title="Android" %}
{% code title="Java" %}

```java
Map<String, String> customParams = customParams();
ShowOptions showOptions = new ShowOptions();
showOptions.setCustomParameters(customParams);
Interstitial.show(placementId, showOptions, activity);
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
let showOptions = FYBShowOptions()
showOptions.customParameters = [\
    "myCustomKey": "myCustomValue",\
    "anotherCustomKey": "anotherCustomValue"]
FYWInterstitial.show(
    "placementID",
    options: showOptions)
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
Dictionary<string, string> customParameters = new Dictionary<string, string>();
customParameters.Add("myCustomKey", "myCustomValue");
customParameters.Add("anotherCustomKey", "anotherCustomValue");
ShowOptions options = new ShowOptions(customParameters);
Interstitial.Show(
    "placementID",
    options);
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Rewarded Ads

To set custom parameters in Rewarded ads, use the following API:

{% tabs %}
{% tab title="Android" %}
{% code title="Java" %}

```java
Map<String, String> customParams = customParams();
ShowOptions showOptions = new ShowOptions();
showOptions.setCustomParameters(customParams);
Rewarded.show(placementId, showOptions, activity);
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
let showOptions = FYBShowOptions()
showOptions.customParameters = [\
    "myCustomKey": "myCustomValue",\
    "anotherCustomKey": "anotherCustomValue"]
FYWRewarded.show(
    "placementID",
    options: showOptions)
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
Dictionary<string, string> customParameters = new Dictionary<string, string>();
customParameters.Add("myCustomKey", "myCustomValue");
customParameters.Add("anotherCustomKey", "anotherCustomValue");
RewardedOptions rewardedOptions = new RewardedOptions(
    customParameters);
Rewarded.Show(
    "placementID",
    rewardedOptions);
```

{% endcode %}
{% endtab %}
{% endtabs %}


# Impression Level Data

DT FairBid enables you to access detailed information for each impression through the impressions callback APIs. The information includes, for example, which demand source served the ad and its expected or exact revenue.

You can call two different APIs that refer to different stages in the impression's lifetime:

* `(OnShow)`: When the ad appears.
* `(OnAvailable)`: Before the ad appears, once a Fill becomes available.

The following table describes Impression Level Data attributes.

| Property Name         | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `advertiserDomain`    | A unique identifier for a set of campaigns for the same advertiser.                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `campaignId`          | A unique identifier that represents a Campaign.                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `countryCode`         | Identifier of the country of the ad impression (in ISO country code).                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `creativeId`          | <p>A unique identifier that represents the creative in the bid response.<br>This can be useful when a particular creative causes user experience issues.</p>                                                                                                                                                                                                                                                                                                                                                                  |
| `currency`            | Currency of the payout.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `demandSource`        | <p>Identifies the demand source name of the buy-side/demand-side entity that purchased the impression:<br></p><ul><li>When mediated networks win an impression, the mediated network's name appears.</li><li>When a DSP buying through the programmatic marketplace wins the impression, the DSP's name appears.</li></ul>                                                                                                                                                                                                    |
| `impressionDepth`     | The number of impressions in the current session for the given Placement Type.                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `impressionId`        | A unique identifier for a specific impression.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `requestId`           | Unique ID of the bid request.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `jsonString`          | A JSON representation of the data serialized to a String.                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `netPayout`           | <p>Net payout for an impression.<br>The value accuracy is returned in the <code>priceAccuracy</code> field. The value is provided in units returned in the currency field.</p>                                                                                                                                                                                                                                                                                                                                                |
| `networkInstanceId`   | <p>The mediated ad network's original Placement/Zone/Location/Ad Unit ID that you created in their dashboard.<br>For ads shown by the DT Exchange, the <code>networkInstanceId</code> is the Placement ID you created in the DT Console.</p>                                                                                                                                                                                                                                                                                  |
| `placementType`       | <p>Defines the format and location of ads:<br></p><ul><li>Banner: Rectangle ads appear either at the top or bottom of the screen. The user can view them but cannot dismiss them.</li><li>Rewarded: Full-screen ad format that shows a short video ad to the user. Upon completion of the video, the user will earn a reward.</li><li>Interstitial: Static or video full-screen ads. The user can view and then immediately dismiss them. This is a non-rewarded format for the user.</li></ul>                               |
| `priceAccuracy`       | <p>Accuracy of the <code>netPayout</code> value:<br></p><ul><li>Programmatic: <code>netPayout</code> is the exact and committed impression value available when programmatic buyers win impressions.</li><li>Predicted: DT's estimation of the impression value is based on historical data from non-programmatic mediated network's reporting APIs.</li><li>Undisclosed: The demand source does not agree to disclose the payout of every impression; in such cases, the <code>netPayout</code> is <code>0</code>.</li></ul> |
| `renderingSDK`        | Name of the SDK in charge of rendering the ad.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `renderingSDKVersion` | <p>The version of the SDK rendering the ad.<br>When AdMob renders an impression, the <code>renderingSDKVersion</code> shows the Google Play Services version.</p>                                                                                                                                                                                                                                                                                                                                                             |
| `variantId`           | A unique identifier that represents the variant delivered to the device.                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

## Impression Data Upon Showing the Ad

All ad formats, Banners, Interstitials, and Rewarded, provide you access to the `ImpressionData` object through their callback APIs:

### Android

{% tabs %}
{% tab title="Interstitial" %}
{% code title="Kotlin" %}

```kotlin
Interstitial.setInterstitialListener(object : InterstitialListener {

    override fun onShow(placementId: String, impressionData: ImpressionData) {
        val netPayout = impressionData.netPayout
        val currency = impressionData.currency
        val priceAccuracy = impressionData.priceAccuracy
        val impressionDepth = impressionData.impressionDepth

        val message = "Placement $placementId has been shown with a " +
                      "net payout of $netPayout $currency " +
                      "with accuracy: $priceAccuracy " +
                      "and impression depth: $impressionDepth"

        Log.d(TAG, message)
    }
})

val placementId = "12345"

if (Interstitial.isAvailable(placementId)) {
    Interstitial.show(placementId, context)
}
```

{% endcode %}

{% code title="Java" %}

```java
Interstitial.setInterstitialListener(new InterstitialListener() {

    @Override
    public void onShow(@NonNull String placementId, @NonNull ImpressionData impressionData) {
        double netPayout = impressionData.getNetPayout();
        String currency = impressionData.getCurrency();
        ImpressionData.PriceAccuracy priceAccuracy = impressionData.getPriceAccuracy();
        int impressionDepth = impressionData.getImpressionDepth();

        String message = String.format("Placement %s has been shown with a net payout of %f %s " +
                                       "with accuracy: %s and impression depth: %d", 
                                       placementId, netPayout, currency, priceAccuracy, impressionDepth);

        Log.d(TAG, message);
    }
});

String placementId = "12345";

if (Interstitial.isAvailable(placementId)) {
    Interstitial.show(placementId, context);
}
```

{% endcode %}

Expected log output for Kotlin and Java

```java
Placement 12345 has been shown with a 
net payout of 4.000000 USD 
with accuracy: PREDICTED and 
impression depth: 1
```

{% endtab %}
{% endtabs %}

### iOS

{% tabs %}
{% tab title="Banner" %}
{% code title="Swift" %}

```swift
optional func bannerDidShow(
    _ banner: FYBBannerAdView,
    impressionData: FYBImpressionData
)
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
- (void)bannerDidShow:
    (FYBBannerAdView *)banner 
    impressionData:(nonnull FYBImpressionData *)impressionData;
```

{% endcode %}
{% endtab %}

{% tab title="Interstitial" %}
{% code title="Swift" %}

```swift
optional func interstitialDidShow(
    _ placementId: String,
    impressionData: FYBImpressionData
)

optional func interstitialDidFail(
    toShow placementId: String,
    withError error: Error,
    impressionData: FYBImpressionData
)
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
- (void)interstitialDidShow:
    (nonnull NSString *)placementId 
    impressionData:(nonnull FYBImpressionData *)impressionData;

- (void)interstitialDidFailToShow:
    (nonnull NSString *)placementId 
    withError:(nonnull NSError *)error 
    impressionData:(nonnull FYBImpressionData *)impressionData;
```

{% endcode %}
{% endtab %}

{% tab title="Rewarded" %}
{% code title="Swift" %}

```swift
optional func rewardedDidShow(
    _ placementId: String,
    impressionData: FYBImpressionData
)
optional func rewardedDidFail(
    toShow placementId: String,
    withError error: Error,
    impressionData: FYBImpressionData
)
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
- (void)rewardedDidShow:
    (nonnull NSString *)placementId 
    impressionData:(nonnull FYBImpressionData *)impressionData;
- (void)rewardedDidFailToShow:
    (nonnull NSString *)placementId 
    withError:(nonnull NSError *)error 
    impressionData:(nonnull FYBImpressionData *)impressionData;
```

{% endcode %}
{% endtab %}
{% endtabs %}

The example below showcases how to access the data on an Interstitial integration. The integration for Rewarded and Banners is similar.

{% tabs %}
{% tab title="Interstitial" %}
{% code title="Swift" %}

```swift
func interstitialDidShow(
    _ placementId: String,
    impressionData: FYBImpressionData
) {
    let currency = impressionData.currency ?? "(nil)"
    let payout = impressionData.netPayout?.doubleValue ?? 0
    let accuracy = impressionData.priceAccuracy
    let impressionDepth = impressionData.impressionDepth
    
    print("Placement \(placementId) has been shown with a " +
          "net payout of \(payout) \(currency) " +
          "with accuracy: \(accuracy) " +
          "and impression depth: \(impressionDepth)")
}
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
- (void)interstitialDidShow:
    (NSString *)placementId 
    impressionData:(FYBImpressionData *)impressionData {
    
    NSLog(@"Placement %@ has been shown with a net payout of %@ %@ "
          "with accuracy: %d and impression depth: %i", 
          placementId, impressionData.netPayout, 
          impressionData.currency, 
          impressionData.priceAccuracy, 
          impressionData.impressionDepth);
}
```

{% endcode %}

Expected log output for Swift and Objective-C

```java
Placement 12345 has been shown with a 
net payout of 4.000000 USD 
with accuracy: PREDICTED and 
impression depth: 1
```

{% endtab %}
{% endtabs %}

### Unity

All ad formats provide access to the `ImpressionData` object through their callback APIs:

{% code title="C#" %}

```csharp
void OnShow(string placementId, ImpressionData impressionData); 
void OnShowFailure(string placementId, ImpressionData impressionData);
```

{% endcode %}

The example below showcases how to access the data on an Interstitial integration. The integration for Rewarded and Banners is similar.

{% tabs %}
{% tab title="Interstitial" %}
{% code title="C#" %}

```csharp
Interstitial.SetInterstitialListener(new MyInterstitialListener());

class MyInterstitialListener : InterstitialListener {
    public void OnShow(string placementId, ImpressionData impressionData) {
        string netPayout = impressionData.netPayout;
        string currency = impressionData.currency;
        int impressionDepth = impressionData.impressionDepth;
        ImpressionData.PriceAccuracy priceAccuracy = impressionData.priceAccuracy;

        Debug.Log($"Placement {placementId} has been shown with a " +
                  $"net payout of {netPayout} {currency} " +
                  $"with accuracy: {priceAccuracy} " +
                  $"and impression depth: {impressionDepth}");
    }
}

string placementId = "12345";

if (Interstitial.IsAvailable(placementId)) {
    Interstitial.Show(placementId);
}
```

{% endcode %}

Expected log output:

```java
Placement 12345 has been shown with a 
net payout of 4.000000 USD 
with accuracy: PREDICTED and 
impression depth: 1
```

{% endtab %}
{% endtabs %}

## Impression Data Before Showing the Ad

You can also access the same information before showing the ad. This information will be available once you have a fill for that placement. If the placement for which you request the impression data does not have a fill, the API will return `nil`.

{% hint style="warning" %}
Calling this API at different moments may result in different values for the impression depth field since impression depth is counted for the ad type, regardless of placement. For more information, see [Impression Depth](#impression-depth).
{% endhint %}

### Android

{% tabs %}
{% tab title="Banner" %}
Use this query in conjunction with loading a banner. For more information, see [Loading a Banner](/dt-fairbid/fairbid-sdk/ad-formats/banner-ads#showing-a-banner).

{% code title="Kotlin" %}

```kotlin
val bannerView = BannerView(requireContext(), placementId)
val impressionData = bannerView.impressionData
```

{% endcode %}
{% endtab %}

{% tab title="Interstitial" %}
{% code title="Kotlin" %}

```kotlin
override fun onAvailable(placementId: String) {
val impressionData = Interstitial.getImpressionData(placementId)
}
```

{% endcode %}

{% code title="Java" %}

```java
@Override
public void onAvailable(String placementId) {
    ImpressionData impressionData = Interstitial.getImpressionData(placementId);
}
```

{% endcode %}
{% endtab %}

{% tab title="Rewarded" %}
{% code title="Kotlin" %}

```kotlin
override fun onAvailable(placementId: String) {
    val impressionData = Rewarded.getImpressionData(placementId)
}
```

{% endcode %}

{% code title="Java" %}

```java
@Override
public void onAvailable(String placementId) {
    ImpressionData impressionData = Rewarded.getImpressionData(placementId);
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

### iOS

{% tabs %}
{% tab title="Interstitial" %}
{% code title="Swift" %}

```swift
func interstitialIsAvailable(_ placementId: String) {
    let impressionData = FYBInterstitial.impressionData(placementId)
}
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
@Override
- (void)interstitialIsAvailable:(NSString *)placementId {
    FYBImpressionData *impressionData = [FYBInterstitial impressionData:placementId];
}
```

{% endcode %}
{% endtab %}

{% tab title="Rewarded" %}
{% code title="Swift" %}

```swift
func interstitialIsAvailable(_ placementId: String) {
    let impressionData = FYBInterstitial.impressionData(placementId)
}
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
- (void)rewardedIsAvailable:(NSString *)placementId {
    FYBImpressionData *impressionData = [FYBRewarded impressionData:placementId];
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Unity

{% tabs %}
{% tab title="Insterstitial" %}
{% code title="C#" %}

```csharp
public void OnAvailable(string placementId) {
    ImpressionData impressionData = Interstitial.GetImpressionData(placementId);
}
```

{% endcode %}
{% endtab %}

{% tab title="Rewarded" %}
{% code title="C#" %}

```csharp
public void OnAvailable(string placementId) {
    ImpressionData impressionData = Rewarded.GetImpressionData(placementId);
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Impression Depth

Impression depth represents the number of impressions in a given session per ad format. Impression depth is accessible directly from each ad format class, which you can find in the following [example](#example). Alternatively, it can be accessed through the `ImpressionLevelData` object, as described in [Impression Data Upon Showing the Ad](#impression-data-upon-showing-the-a-d).

The impression depth for each ad format increases throughout the session as more ads are displayed. It is reset only when:

* The session ends (the app is killed).
* The SDK considers the session has timed out.

### Session Timeout

Session timeout or `session background timeout` represents the amount of time the user needs to spend with the app in the background before we consider them back to user engagement levels similar to a fresh new session. At this point, for all ad formats, the impression depth is reset to `0`.

The Session timeout value is 30 minutes by default.

The example below illustrates how you can access the `impressionDepth` value for all ad formats.

{% tabs %}
{% tab title="Android" %}
{% code title="Kotlin" %}

```kotlin
val impressionDepth = Interstitial.getImpressionDepth()
      
val impressionDepth = Banner.getImpressionDepth()
      
val impressionDepth = Rewarded.getImpressionDepth()
```

{% endcode %}

{% code title="Java" %}

```java
val impressionDepth = Interstitial.getImpressionDepth()
      
val impressionDepth = Banner.getImpressionDepth()
      
val impressionDepth = Rewarded.getImpressionDepth()
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
let impressionDepth = FYBBanner.impressionDepth

let impressionDepth = FYBInterstitial.impressionDepth

let impressionDepth = FYBRewarded.impressionDepth
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
NSUInteger impressionDepth = FYBRewarded.impressionDepth;

NSUInteger impressionDepth = FYBInterstitial.impressionDepth;

NSUInteger impressionDepth = FYBBanner.impressionDepth;
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
int impressionDepth = Banner.GetImpressionDepth();

int impressionDepth = Interstitial.GetImpressionDepth();

int impressionDepth = Rewarded.GetImpressionDepth();
```

{% endcode %}
{% endtab %}
{% endtabs %}


# User Settings

The `UserInfo` and the `FYBUserInfo` object allows you to pass information about the user.

{% tabs %}
{% tab title="Android" %}
{% code title="Kotlin" %}

```kotlin
val calendar = Calendar.getInstance()
calendar.set(Calendar.YEAR, 1990)
calendar.set(Calendar.MONTH, Calendar.MARCH)
calendar.set(Calendar.DAY_OF_MONTH, 1)

UserInfo.birthDate = calendar.time
UserInfo.gender = Gender.FEMALE
UserInfo.postalCode = "31352"
```

{% endcode %}

{% code title="Java" %}

```java
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.YEAR, 1990);
calendar.set(Calendar.MONTH, Calendar.MARCH);
calendar.set(Calendar.DAY_OF_MONTH, 01);
UserInfo.setBirthDate(calendar.getTime());
UserInfo.setGender(Gender.FEMALE);
UserInfo.setPostalCode("31352");
```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}
{% code title="Swift" %}

```swift
let user = FairBid.user()

user.birthDate = Date(timeIntervalSince1970: 0)
user.gender = .female
user.postalCode = "31352"
```

{% endcode %}

{% code title="Objective-C" %}

```objective-c
FYBUserInfo *user = [FairBid user];

user.birthDate = [NSDate dateWithTimeIntervalSince1970:0];
user.gender = FYBGenderFemale; 
user.postalCode = @"31352";
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code title="C#" %}

```csharp
UserInfo.SetGender(Gender.MALE);
UserInfo.SetPostalCode("94103");
UserInfo.SetBirthDate("1990/08/05");
```

{% endcode %}
{% endtab %}
{% endtabs %}


# SKAdNetwork ID Auto Updater

The iOS SKAdNetwork ID Auto Updater is a build automation tool that keeps your `Info.plist` file synchronized with the latest SKAdNetwork IDs from your advertising partners during each build process. This ensures the list of supported ad network IDs remains current, even when partners update their IDs.

This article describes how to build, deploy, and integrate the tool into Xcode and Unity Editor.

## Installing the Auto Updater

Download the [DT SKAd\_updater](https://github.com/fyber-engineering/SKAd_updater) from GitHub. There are several methods to install the tool:

### Installing via Homebrew (Preferred)

1. Add the tap:

{% code title="Bash" %}

```bash
brew tap fyber-engineering/skad_updater
```

{% endcode %}

2. Install the application:

{% code title="Bash" %}

```bash
brew install skad_updater
```

{% endcode %}

### Downloading the Release Tar File

Download a specific release version from [SKAd\_updater](https://github.com/fyber-engineering/SKAd_updater/releases) on GitHub

1. Select the required release version.
2. Download the `.tar.gz` file and extract to your required folder

{% code title="Bash" %}

```bash
tar -xzf skad_updater-.tar.gz -C [folder-name]
```

{% endcode %}

3. Run the executable inside the inner `bin` folder.
4. (Optional) Add the executable to your `$PATH` to use `skad_updater` globally.

## Compiling the Source Code

Run all commands from the repository's root directory base folder.

### Prerequisites

Ensure the following dependencies are installed:

* macOS 10.15 or later
* curl
* OMake 3.18 or later
* Python 3.8 or later
* clang-format

### Automatic Build

Run this sequence to build the tool automatically:

{% code title="Bash" %}

```bash
./clean
./build
```

{% endcode %}

### Manual Build

Build the tool step by step:

{% code title="Bash" %}

```bash
./clean

cmake -S . -B build
cmake --build build --target format
cmake --build build --target fix-format
cmake --build build --target skad_updater
```

{% endcode %}

## Testing the Source Code

Verify the tool works correctly in your environment.

### Prerequisites

Ensure the following dependencies are installed:

* curl
* Python 3.8 or later
* Create a [virtual env](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/) under `tests/servermock` and install:

{% code title="Bash" %}

```bash
ip install -r requirements.txt
```

{% endcode %}

### Testing

Verify the tool works correctly in your environment.

{% code title="Bash" %}

```bash
cmake --build build --target tests_run
cd build/tests/
./tests_run
```

{% endcode %}

### Packaging

Generate a `.tar.gz` file in the build directory.

{% code title="Bash" %}

```bash
cmake --build build --target package
```

{% endcode %}

## Utilizing the Tool

### Synopsis

Run `skad_updater` from the terminal to update your `Info.plist` with the required SKAdNetwork IDs.

{% code title="Bash" %}

```bash
skad_updater ( (--help | -h) | (--show_networks) |
--plist_file_path [plist-file-path] (--network_list
[comma-separated-network-names] | --pod_file_path [pod-file-path])
[--dry_run] )
```

{% endcode %}

#### Network List Options

Define which networks to update:

* Explicit
  * Use `--show_networks` to show a list of supported ad networks.
  * Use `[--network_list <network-name-list>]` to show a parameter with a list of network names separated by a comma
* Automatic
  * Use `pod_file_path <pod-file-path>` to automatically derive networks from your Podfile, where `<pod-file-path>` is the path to the pod file.
* Combination
  * Use both `--network_list` and `pod_file_path` to combine explicit and automatic network lists.

### Parameters

The following table describes the network list parameters.

| **Parameter**     | **Value**                         | **Description**                                                                                                                                                                                                 |
| ----------------- | --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `plist_file_path` | `list-file-path`                  | Path to the target `Info.plist` file.                                                                                                                                                                           |
| `--network_list`  | `<comma-separated-network-names>` | Requests a specific list of networks to update. Provides a comma-separated list of network names as the argument, which you can combine with networks found in the Podfile.                                     |
| `pod_file_path`   | `<pod-file-path>`                 | <p>Update all the networks found in the Podfile.<br>Provide the Podfile path as the argument. Update additional networks not in the Podfile by including them in the <code>--network\_list</code> argument.</p> |

### Optional Parameters

| **Parameter**     | **Description**                                                              |
| ----------------- | ---------------------------------------------------------------------------- |
| `--dry_run`       | Performs a dry run and prints the updated plist file instead of overwriting. |
| `--show_networks` | Shows the list of supported networks.                                        |
| `--help, -h`      | Provides a help message and exit                                             |

### Examples

The following examples show how to use `skad_updater` with different parameters:

{% code title="Bash" %}

```bash
skad_updater --help
skad_updater --show_networks
skad_updater --plist_file_path <path-to-plist> --pod_file_path <path-to-podfile> --dry_run
skad_updater --plist_file_path <path-to-plist> --pod_file_path <path-to-podfile>
skad_updater --plist_file_path <path-to-plist> --network_list <csv-network-list> --dry_run
skad_updater --plist_file_path <path-to-plist> --network_list <csv-network-list>
skad_updater --plist_file_path <path-to-plist> --network_list <csv-network-list> --pod_file_path <path-to-podfile>
```

{% endcode %}

### Backups

The tool backs up the current `Info.plist` as `Info.plist.back.X` whenever it modifies the file. X increments with each backup.

### Reformatting the plist File

The Auto Updater formats the plist using standard XML indentation. Xcode may display slightly different formatting. To restore Xcode formatting:

{% code title="Bash" %}

```bash
plutil -convert xml1 [path_to_plist_file]
```

{% endcode %}

### Man Page

Use the manpage to read the usage instructions from the terminal:

{% code title="Bash" %}

```bash
$ man skad_updater
```

{% endcode %}

## Integrating into a Build Environment with Cocoapods

Use the `skad_updater` tool to automatically update your SKAdNetwork IDs during the build process.

### iOS

Manually add a Run Script Phase in Xcode to trigger the `skad_updater` tool.

![](/files/9075f3b8352e98e2b0d1e40bf4f38b7ed0c536a4)

1. Open your Xcode project.
2. Select the project in the **Project Navigator**.
3. Select the **Build Phases** tab to enable the build phase menu items.
4. Click **Add** in the project editor to add build phases.
5. Select a **Run Script** phase and add the following shell script:

{% code title="Bash" overflow="wrap" %}

```bash
echo "$INFOPLIST_FILE" | sed 's/ /\\ /g' | (read SANITIZED_PATH; skad_updater --plist_file_path "$SANITIZED_PATH" --network_list=FairBidSDK --pod_file_path ./Podfile; plutil -convert xml1 "$SANITIZED_PATH")
```

{% endcode %}

6. Build your project.

The `skad_updater` tool automatically updates your `Info.plist` file.

### Unity

Use Unity's scripting APIs to automatically add a Build Phase that runs the `skad_updater` tool.

1. Export the Xcode project from Unity to add a Build Phase to Xcode, which will update the `Info.plist` file.
2. Add the Build Phase automatically and insert a run script using Unity's scripting APIs.\
   The script automatically inserts a Run Script Phase after the Xcode project is generated.
3. Add a new script file to the `Assets/Editor` folder in your Unity project, as in the following example.

{% code title="C#" %}

```csharp
using UnityEditor;
using UnityEditor.iOS.Xcode;
using UnityEditor.Callbacks;

public static class SKAdNetworkUpdater
{
    [PostProcessBuild(1)]
    public static void OnPostProcessBuild(BuildTarget buildTarget, string path)
    {
        if (buildTarget != BuildTarget.iOS)
        {
            return;
        }

        string projectPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj";
        PBXProject pbxProject = new PBXProject();
        pbxProject.ReadFromFile(projectPath);

#if UNITY_2019_3_OR_NEWER
        string targetGUID = pbxProject.GetUnityMainTargetGuid();
#else
        string targetGUID = pbxProject.TargetGuidByName("Unity-iPhone");
#endif

        string shellPath = "/bin/sh";
        int index = 0;
        string name = "Update SKAdNetwork ids";
        string shellScript = @"echo ""$INFOPLIST_FILE"" | sed 's/ /\\ /g' | (read SANITIZED_PATH; skad_updater --plist_file_path ""$SANITIZED_PATH"" --network_list=FairBidSDK --pod_file_path ./Podfile; plutil -convert xml1 ""$SANITIZED_PATH"")";
        pbxProject.InsertShellScriptBuildPhase(index, targetGUID, name, shellPath, shellScript);
        pbxProject.WriteToFile(projectPath);
    }
}
```

{% endcode %}

4. The `skad_updater` automatically updates your `Info.plist` file.

## Integrating into a Build Environment without Cocoapods

If you do not use CocoaPods, follow the same steps; however, instead of passing `<pod_file_path>`, use `--network_list` in the script to provide a comma-separated network list.


# Enabling DT Offer Wall

DT Offer Wall is a monetization solution available from Digital Turbine that provides an engaging, user-friendly ad format that allows your app users to complete offers in exchange for rewards. It is a great addition to your app if you're already using DT FairBid for ad mediation. And since both DT FairBid and DT Offer Wall are part of the same SDK, you are one step away from boosting user engagement and increasing your revenue potential. For more information, see the [DT Offer Wall product page](https://www.digitalturbine.com/dt-offer-wall).


# Supported Networks

{% @supported-networks-table-fallback/supported-networks-table %}


# Network Integration Guides


# AdMob/Google Bidding

This article provides steps to integrate AdMob/Google bidding for mediation.

{% hint style="info" %}
Mediation of AdMob Bidding placements are transacted on the **Google bidding** network. For more information, see Google's [documentation on partner bidding](https://support.google.com/admob/answer/12374122?sjid=7406285673992422155-NC).
{% endhint %}

AdMob currently supports the the following [ad types](/dt-exchange/additional-resources/ad-types-and-specification):

* Banner
* Interstitial
* Rewarded
* MREC

To integrate AdMob/Google bidding as a DT mediated network:

* [Step 1: Locate AdMob parameters](#step1)
* [Step 2: Add AdMob as a DT mediated network](#step2)
  * [Add AdMob as a Waterfall network](#waterfall).\
    This allows for traditional waterfall mediation with AdMob. Ensure that your app and bidding placements have been added to the AdMob network.
  * Add AdMob/Google bidding as a Bidding network:
    * [Add Google bidding as a manually managed Bidding network](#biddermanual)\
      This allows DT to include Google bidding in bidding mediation. Ensure that your app and bidding placements have been added to the AdMob network.
    * [Add Google bidding as an automatically managed Bidding network](#bidderauto)\
      This allows DT to include Google bidding in bidding mediation. DT adds your app and bidding placements to the AdMob network on your behalf.
* [Step 3: Add the AdMob/Google bidding SDK to your integration](#step3)
* [Step 4: Test your integration](#step4)

## Step 1: Locate AdMob Parameters <a href="#step1" id="step1"></a>

Depending on the type of mediation intend use, adding AdMob as a mediated network requires specific parameters from the AdMob Dashboard. Before you can locate these parameters, use the following table to ensure that you have completed any app setup tasks in the AdMob Dashboard.

<table data-full-width="false"><thead><tr><th width="271.05859375">AdMob Tasks</th><th>Waterfall</th><th>Bidding - Manual</th><th align="center">Bidding - Automatic</th></tr></thead><tbody><tr><td><a href="https://admob.google.com/home/">Create</a> an AdMob account.</td><td>✓</td><td>✓</td><td align="center">✓</td></tr><tr><td><a href="https://support.google.com/admob/answer/9989980?hl=en&#x26;sjid=1010601375034565367-NC">Add</a> your app to the AdMob dashboard.</td><td>✓</td><td>✓</td><td align="center"></td></tr><tr><td><a href="https://support.google.com/admob/answer/6128738?hl=en&#x26;sjid=7406285673992422155-NC">Create</a> AdMob ad units for your app.</td><td>✓</td><td></td><td align="center"></td></tr><tr><td><a href="https://support.google.com/admob/answer/12374122?sjid=7406285673992422155-NC">Create</a> AdMob partner bidding ad units for your app.</td><td></td><td>✓</td><td align="center"></td></tr></tbody></table>

Once you have completed the necessary tasks in the AdMob Dashboard, use the following table to determine which AdMob parameters you need to locate.

<table><thead><tr><th width="130.67578125">Parameter</th><th width="318.58984375">Description</th><th width="102.37890625">Waterfall</th><th width="80.3671875">Bidding - Manual</th><th>Bidding - Automatic</th></tr></thead><tbody><tr><td><code>Ad Unit ID</code></td><td>Unique identifier of the ad unit you want to mediate. For more information, see <a href="https://support.google.com/admob/answer/7356431?hl=en&#x26;sjid=9565178303220392684-NC">Google's documentation</a>.</td><td>✓</td><td>✓</td><td></td></tr><tr><td><code>APP ID</code></td><td>Unique identifier of the app in AdMob. For more information, see <a href="https://support.google.com/admob/answer/7356431?hl=en&#x26;sjid=9565178303220392684-NC">Google's documentation</a>.</td><td>✓</td><td>✓</td><td></td></tr><tr><td><code>Bundle</code></td><td>Bundle ID for your app in the app store.</td><td>✓</td><td></td><td></td></tr></tbody></table>

## Step 2: Adding AdMob/Google Bidding as a DT Mediated Network <a href="#step2" id="step2"></a>

Before you add Google Bidding as a DT mediated network, complete the following tasks in the DT Console:

* Add your App to the DT ecosystem. For more information, see [Adding an App](/dt-console/app-management/adding-a-new-app/adding-an-app).
* Ensure that you have a DT Placement for each AdMob ad unit you want to mediate with DT. For more information, see [Setting Up Placements](/dt-console/app-management/setting-up-an-existing-app/setting-up-placements).

### Adding AdMob as a Waterfall Network <a href="#waterfall" id="waterfall"></a>

To add AdMob as a Waterfall network:

1. From the [DT Console](https://console.fyber.com/), go to **Monetization → App Management**, locate the **Network** tab for your app, and click **Add network**.\
   The list of available networks appears.

   <div align="left" data-with-frame="true"><img src="/files/8fd47812a24284737adea8361d49942eee0db06a" alt="Network List"></div>
2. Click the **AdMob** tile.\
   The **Add network** form for **AdMob** appears.

   <div align="left" data-with-frame="true"><img src="/files/195293e87a48d17637f211d52ac70ef62eb5a522" alt="AdMob Form"></div>
3. If you have not previously signed in to Google, click **Sign in with Google** and enter your AdMob credentials and Waterfall parameters from [Step 1](#step1).\
   Signing in to Google automatically enters your AdMob `Publisher ID` and `Refresh Token`.
4. Create a Waterfall network instance for each AdMob ad unit you want DT to mediate. Use the Admob `Ad unit ID` you located in [Step 1](#step1) as the **Instance ID**.\
   For more information, see [Adding a Waterfall Instance](/dt-console/app-management/setting-up-an-existing-app/setting-up-instances#adding-a-waterfall-instance).

### Add Google Bidding as a Manually Managed Bidding Network <a href="#biddermanual" id="biddermanual"></a>

To add Google Bidding for manually managed bidding mediation:

1. From the [DT Console](https://console.fyber.com/), go to **Monetization → App Management**, locate the **Network** tab for your app, and click **Add network**.\
   The list of available networks appears.

   <div align="left" data-with-frame="true"><img src="/files/6033ad42021e254f496f4c5143f5915bdf08b94a" alt="Google Bidder Network List"></div>
2. Click the **Google bidder** tile.\
   The **Add network** form for **Google bidder** appears.\
   For more information, see [Adding a Manually Managed Bidding Network](/dt-console/app-management/setting-up-an-existing-app/setting-up-mediated-networks#adding-a-manually-managed-bidding-network).

{% hint style="info" %}
Networks that support programmatic bidding appear as separate tiles labeled specifically for bidding. To offer your placements for bidding, make sure you select the *bidder* version of the network—in this case, **Google bidder**.
{% endhint %}

<div align="left" data-with-frame="true"><img src="/files/51541d358a44736daf03e8567cc4185c9eaa45a2" alt="Google Bidder Manual"></div>

3. Click **Manually Managed** and enter the AdMob parameters for manual management from [Step 1](#step1).
4. Create a Bidding network instance for each AdMob AD unit you want DT to mediate. Use the AdMob `AD Unit ID` you located in [Step 1](#step1) as the **Instance ID**.\
   For more information, see [Manually Adding a Bidding Instance](/dt-console/app-management/setting-up-an-existing-app/setting-up-instances#manually-adding-a-bidding-instance).

### Add Google Bidding as an Automatically Managed Bidding Network <a href="#bidderauto" id="bidderauto"></a>

To add Google Bidding for automatically managed bidding mediation:

1. From the [DT Console](https://console.fyber.com/), go to **Monetization → App Management**, locate the **Network** tab for your app, and click **Add network**.\
   The list of available networks appears.

![Google Bidder Network List](/files/6033ad42021e254f496f4c5143f5915bdf08b94a)

2. Click the **Google bidder** tile.\
   The **Add network** form for **Google bidder** appears.\
   For more information, see [Adding an Automatically Managed Bidding Network](/dt-console/app-management/setting-up-an-existing-app/setting-up-mediated-networks#adding-an-automatically-managed-bidding-network).

{% hint style="info" %}
Networks that support programmatic bidding appear as separate tiles labeled specifically for bidding. To offer your placements for bidding, make sure you select the *bidder* version of the network—in this case, **Google bidder**.
{% endhint %}

<div align="left" data-with-frame="true"><img src="/files/97626c48f83479618dbbe0cdbb458c127ebf098a" alt="Google Bidder Auto"></div>

3. Click **Automatically Managed**.
4. If you have not signed in to Google previously, click **Sign in with Google** and enter your AdMob credentials.\
   Signing in to Google automatically enters your AdMob `Publisher ID` and `Refresh Token`.
5. Auto-generate a Bidding network instance for each FairBid placement you want to mediate with Liftoff Monetize. For more information, see [Automatically Adding a Bidding Instance](/dt-console/app-management/setting-up-an-existing-app/setting-up-instances#automatically-adding-a-bidding-instance).

## Step 3: Add the AdMob/Google Bidding SDK to your Integration <a href="#step3" id="step3"></a>

To integrate the <code class="expression">page.vars.fb\_sdk\_name</code> SDK, follow the instructions on the [Supported Networks](/dt-fairbid/fairbid-sdk/supported-networks) page.

## Step 4: Test Your Integration <a href="#step4" id="step4"></a>

Use the DT Test Suite to verify that you have set up your app properly for FairBid mediation. The DT Test Suite is available for Android, iOS, and Unity apps. For more information about using the DT Test Suite, see [Test Suite](/dt-fairbid/fairbid-sdk/tools/test-suite).

<div align="left" data-with-frame="true"><img src="/files/5139af76cb91452787becf8f79f9ac650890bc89" alt="" width="188"></div>


# Amazon Publisher Services

This article is for publishers who want to use the DT FairBid SDK to load and display ads from Amazon Publisher Services (APS).

APS currently supports the following [ad types](/dt-exchange/additional-resources/ad-types-and-specification):

* Banner
* Interstitial
* Rewarded

To integrate APS as a mediated ad network with DT:

* [Step 1: Retrieve APS Information](#step-1-retrieve-aps-information).
* [Step 2: Add APS as a mediated network](#step-2-add-aps-as-a-mediated-network).
* [Step 3: Initialize the APS SDK](#step-3-initialize-the-aps-sdk).
* [Step 4: Add the APS SDK to your integration](#step-4-add-the-aps-sdk-to-your-integration).
* [Step 5: Test your integration](#step-5-test-your-integration).

## Step 1: Retrieve APS Information

Before retrieving your APS information, complete the following tasks to create APS ad unit inventory to mediate with DT. For more information about how to create APS inventory, see the [APS Portal documentation](https://ams.amazon.com/webpublisher/uam/docs/aps-mobile/resources).

* Create an APS account.

{% hint style="info" %}
Amazon Publisher Services (APS) is an invitation-only program. To create an APS account, [request an invitation](https://aps.amazon.com/aps/contact-us/) from APS. Once approved, APS sends an invitation with instructions on creating your APS account.
{% endhint %}

* Add your app to the APS Portal.
* Add Slots for your app.
* Update your `App-ads.txt` file to include the APS Portal.

Once you have created APS inventory, locate the following information in the APS Portal. This information is required later in Step 2 to set up APS as a DT mediated network.

<table><thead><tr><th width="203.4765625">APS INFO</th><th>DESCRIPTION</th><th>RETRIEVAL INSTRUCTIONS</th></tr></thead><tbody><tr><td>Price Point Mapping</td><td>CSV file containing ad unit pricing.</td><td>Download CSV file. For more information about where to find the file, see the <a href="https://ams.amazon.com/webpublisher/uam/docs/aps-mobile/resources">APS Portal documentation</a>.</td></tr><tr><td><code>UUID</code></td><td>Unique ID assigned to your APS ad slot.</td><td>For more information about how to locate UUIDs, see the APS Portal documentation on <a href="https://ams.amazon.com/webpublisher/mdtb/mobile_apps%23/app/8588">UUIDs</a>.</td></tr></tbody></table>

## Step 2: Add APS as a Mediated Network

Before you add APS as a DT mediated network:

* Ensure that you have access to the APS Portal information you retrieved in [Step 1](#step-1-retrieve-aps-information).
* [Add your App](/dt-console/app-management/adding-a-new-app/adding-an-app) using the DT Console.
* Ensure that you [set up a DT Placement](/dt-console/app-management/setting-up-an-existing-app/setting-up-placements) for each APS ad type you want to mediate with DT.

To add APS as a DT mediated network:

1. Log in to the [DT Console](https://console.fyber.com/), and click **App Management**.
2. [Set up](/dt-console/app-management/setting-up-an-existing-app/setting-up-mediated-networks) APS as a mediated network for your app using the APS Price Point CSV file you downloaded in [Step 1](#step-1-retrieve-aps-information).

{% hint style="info" %}
DT uses the price point mapping across your entire account. If you update your price points in APS, ensure that you upload an updated CSV file in the DT Console.
{% endhint %}

3. For each Placement that you want to mediate with DT, create an ad network instance for APS with the following settings:
   * Use the APS UUID you retrieved in [Step 1](#step-1-retrieve-aps-information) as the **Instance ID**.
   * Turn *off* the **Auto CPM** function. For more information about how to turn off **Auto CPM**, see [Auto CPM](/dt-console/app-management/setting-up-an-existing-app/setting-up-instances#editing-an-instance).\
     For more information about how to add instances to a Placement, see [Setting Up Instances](/dt-console/app-management/setting-up-an-existing-app/setting-up-instances).

## Step 3: Initialize the APS SDK

Initialize the APS SDK within your app so that DT can mediate your APS inventory:

{% tabs %}
{% tab title="Android" %}

### Initializing the APS SDK on Android

The following process is recommended for initializing the APS SDK in either Java or Kotlin implementations on the Android platform.

1. Start DT FairBid SDK with your DT `APP_ID`.

{% code title="Java" %}

```java
FairBid.start(<<APP_ID>>, activity);

```

{% endcode %}

{% code title="Kotlin" %}

```kotlin
FairBid.start(<<APP_ID>>, activity)

```

{% endcode %}

2. Start the APS SDK with the `APP_KEY` configured on your APS Portal.

{% code title="Java" %}

```java
AdRegistration.getInstance(<<APP_KEY>>, context);

```

{% endcode %}

{% code title="Kotlin" %}

```kotlin
AdRegistration.getInstance(<<APP_KEY>>, context)

```

{% endcode %}

3. Create an object that implements the `SlotLoader` interface, and register it to DT FairBid SDK with `APSAdapter.slotLoader`.
4. Implement a Banner ad callback to trigger whenever you call `Banner.show(placementId, activity)` for a placement configured with an APS instance in the waterfall.

{% code title="Java" %}

```java
loadAPSBannerSlot(String slotUUID, int width, int height))

```

{% endcode %}

{% code title="Kotlin" %}

```kotlin
loadAPSBannerSlot(slotUUID: String, width: Int, height: Int)

```

{% endcode %}

5. Implement an Interstitial ad callback to trigger whenever you call `Interstitiat.request(placementId)` for a placement configured with an APS instance in the waterfall.

{% code title="Java" %}

```java
loadAPSInterstitialSlot(String slotUUID)

```

{% endcode %}

{% code title="Kotlin" %}

```kotlin
loadAPSInterstitialSlot(slotUUID: String)

```

{% endcode %}

6. Implement a Rewarded ad callback to trigger whenever you call `Rewarded.request(placementId)` for a placement configured with an APS instance in the waterfall.

{% code title="Java" %}

```java
loadAPSRewardedSlot(String slotUUID)

```

{% endcode %}

{% code title="Kotlin" %}

```kotlin
loadAPSRewardedSlot(slotUUID: String)

```

{% endcode %}

7. Create an object that implements the `DTBAdCallback`.
8. Implement the `onSuccess` callback, and extract the following parameters and pass them back to FairBid via `APSAdapter.setBidInfo(slotUUID, encodedPricePoints, bidInfo)`:
   * Encoded price points
   * Bid info

{% code title="Java" %}

```java
onSuccess(@NonNull DTBAdResponse dtbAdResponse) {
    Log.d("APS", "onSuccess: " + slotUUID);
    String encodedPricePoints = SDKUtilities.getPricePoint(dtbAdResponse);
    String bidInfo = SDKUtilities.getBidInfo(dtbAdResponse);
    APSAdapter.setBidInfo(slotUUID, encodedPricePoints, bidInfo);

```

{% endcode %}

{% code title="Kotlin" %}

```kotlin
onSuccess(dtbAdResponse: DTBAdResponse) {
    Log.d("[APS] onSuccess: $slotUUID")
    val encodedPricePoints: String = SDKUtilities.getPricePoint(dtbAdResponse)
    val bidInfo = SDKUtilities.getBidInfo(dtbAdResponse)
    APSAdapter.setBidInfo(slotUUID, encodedPricePoints, bidInfo)

```

{% endcode %}

9. (Optional) Implement the `onFailure` callback to receive error messages when APS cannot fill a slot.

{% code title="Java" %}

```java
onFailure(@NonNull AdError adError) {
    Log.d("APS", "onFailure: Amazon APS error: " + adError.getMessage());

```

{% endcode %}

{% code title="Kotlin" %}

```kotlin
onFailure(adError: AdError) {
    Log.d("[APS] onFailure: Amazon APS error: ${adError.message}")

```

{% endcode %}

#### **Example: Android Implementation**

{% code title="Java" overflow="wrap" %}

```java
import android.content.Context;
import android.util.Log;

import androidx.annotation.NonNull;

import com.amazon.device.ads.AdError;
import com.amazon.device.ads.AdRegistration;
import com.amazon.device.ads.DTBAdCallback;
import com.amazon.device.ads.DTBAdRequest;
import com.amazon.device.ads.DTBAdResponse;
import com.amazon.device.ads.DTBAdSize;
import com.amazon.device.ads.SDKUtilities;
import com.fyber.FairBid;
import com.fyber.fairbid.adapters.APSAdapter;


// 3. Create object with slotLoader interface
public class AmazonAPS implements APSAdapter.SlotLoader {

    private static AmazonAPS INSTANCE = new AmazonAPS();

    private AmazonAPS() {}

    public static void start(String appKey, Context context) {
        // extra check to perform this only once
        if (!AdRegistration.isInitialized()) {
            // 2. Start APS SDK
            AdRegistration.getInstance(appKey, context);
            // 3. Register slotLoader to FairBid instance
            APSAdapter.setSlotLoader(INSTANCE);
        }
    }

    // 4. Load Banner Ad Type
    @Override
    public void loadAPSBannerSlot(@NonNull String slotUUID, int width, int height) {
        DTBAdRequest adRequest = new DTBAdRequest();
        adRequest.setSizes(new DTBAdSize(width, height, slotUUID));
        // 7. Implement callback
        adRequest.loadAd(new DTBAdCallback() {
                // 9. Implement onFailure
                @Override
                public void onFailure(@NonNull AdError adError) {
                    Log.d("APS", "onFailure: Amazon APS error: " + adError.getMessage());
                }
                // 8. Implement onSuccess callback
                @Override
                public void onSuccess(@NonNull DTBAdResponse dtbAdResponse) {
                    Log.d("APS", "onSuccess: " + slotUUID);
                    String encodedPricePoints = SDKUtilities.getPricePoint(dtbAdResponse);
                    String bidInfo = SDKUtilities.getBidInfo(dtbAdResponse);
                    APSAdapter.setBidInfo(slotUUID, encodedPricePoints, bidInfo);
                }
            });
        }
    }

    // 5. Load Interstitial Ad Type
    @Override
    public void loadAPSInterstitialSlot(@NonNull String slotUUID) {
        DTBAdRequest adRequest = new DTBAdRequest();
        adRequest.setSizes(new DTBAdSize.DTBInterstitialAdSize(slotUUID));
        // 7. Implement callback
        adRequest.loadAd(new DTBAdCallback() {
                // 9. Implement onFailure
                @Override
                public void onFailure(@NonNull AdError adError) {
                    Log.d("APS", "onFailure: Amazon APS error: " + adError.getMessage());
                }
                // 8. Implement onSuccess callback
                @Override
                public void onSuccess(@NonNull DTBAdResponse dtbAdResponse) {
                    Log.d("APS", "onSuccess: " + slotUUID);
                    String encodedPricePoints = SDKUtilities.getPricePoint(dtbAdResponse);
                    String bidInfo = SDKUtilities.getBidInfo(dtbAdResponse);
                    APSAdapter.setBidInfo(slotUUID, encodedPricePoints, bidInfo);
                }
            });
        }
    }

    // 6. Load Rewarded Ad Type
    @Override
    public void loadAPSRewardedSlot(@NonNull String slotUUID) {
        DTBAdRequest adRequest = new DTBAdRequest();
        adRequest.setSizes(new DTBAdSize.DTBVideo(320,480, slotUUID));
        // 7. Implement callback
        adRequest.loadAd(new DTBAdCallback() {
                // 9. Implement onFailure
                @Override
                public void onFailure(@NonNull AdError adError) {
                    Log.d("APS", "onFailure: Amazon APS error: " + adError.getMessage());
                }
                // 8. Implement onSuccess callback
                @Override
                public void onSuccess(@NonNull DTBAdResponse dtbAdResponse) {
                    Log.d("APS", "onSuccess: " + slotUUID);
                    String encodedPricePoints = SDKUtilities.getPricePoint(dtbAdResponse);
                    String bidInfo = SDKUtilities.getBidInfo(dtbAdResponse);
                    APSAdapter.setBidInfo(slotUUID, encodedPricePoints, bidInfo);
                }
            });
        }
    }

}


// ... inside your code
// 1. start DT FairBid SDK
FairBid.start("APP_ID", activity);
// and also start APS through the helper class above
AmazonAPS.start("APP_KEY", context);

```

{% endcode %}

{% code title="Kotlin" overflow="wrap" %}

```kotlin
import android.content.Context
import android.util.Log

import androidx.annotation.NonNull

import com.amazon.device.ads.AdError
import com.amazon.device.ads.AdRegistration
import com.amazon.device.ads.DTBAdCallback
import com.amazon.device.ads.DTBAdRequest
import com.amazon.device.ads.DTBAdResponse
import com.amazon.device.ads.DTBAdSize
import com.amazon.device.ads.SDKUtilities
import com.fyber.FairBid
import com.fyber.fairbid.adapters.APSAdapter

// 3. Create object with slotLoader interface
class AmazonAPS private constructor() : APSAdapter.slotLoader {

    companion object {
        private val instance: AmazonAPS by lazy {
            AmazonAPS()
        }

        fun start(appKey: String, context: Context) {
            // extra check to perform this only once
            if (!AdRegistration.isInitialized()) {
                // 2. Start APS SDK
                AdRegistration.getInstance(appKey, context)
                // 3. Register slotLoader to FairBid instance
                APSAdapter.slotLoader = instance
            }
        }

    }
    // 4. Load Banner Ad Type
    override fun loadAPSBannerSlot(slotUUID: String, width: Int, height: Int) {
        DTBAdRequest().apply {
            setSizes(DTBAdSize(width, height, slotUUID))
            // 7. Implement callback
            loadAd(object : DTBAdCallback {
                // 9. Implement onFailure
                override fun onFailure(adError: AdError) {
                    Log.d("[APS] onFailure: Amazon APS error: ${adError.message}")
                }
                //8. Implement onSuccess callback
                override fun onSuccess(dtbAdResponse: DTBAdResponse) {
                    Log.d("[APS] onSuccess: $slotUUID")
                    val encodedPricePoints: String = SDKUtilities.getPricePoint(dtbAdResponse)
                    val bidInfo = SDKUtilities.getBidInfo(dtbAdResponse)
                    APSAdapter.setBidInfo(slotUUID, encodedPricePoints, bidInfo)
                }
            })
        }
    }

    // 5. Load Interstitial Ad Type
    override fun loadAPSInterstitialSlot(slotUUID: String) {
        DTBAdRequest().apply {
            setSizes(DTBAdSize.DTBInterstitialAdSize(slotUUID))
            // 7. Implement callback
            loadAd(object : DTBAdCallback {
                // 9. Implement onFailure
                override fun onFailure(adError: AdError) {
                    Log.d("[APS] onFailure: Amazon APS error: ${adError.message}")
                }
                // 8. Implement onSuccess callback
                override fun onSuccess(dtbAdResponse: DTBAdResponse) {
                    Log.d("[APS] onSuccess: $slotUUID")
                    val encodedPricePoints: String = SDKUtilities.getPricePoint(dtbAdResponse)
                    val bidInfo = SDKUtilities.getBidInfo(dtbAdResponse)
                    APSAdapter.setBidInfo(slotUUID, encodedPricePoints, bidInfo)
                }
            })
        }
    }

    // 6. Load Rewarded Ad Type
    override fun loadAPSRewardedSlot(slotUUID: String) {
        DTBAdRequest().apply {
            setSizes(DTBAdSize.DTBVideo(320,480, slotUUID))
            // 7. Implement Callback
            loadAd(object : DTBAdCallback {
                // 9. Implement OnFailure
                override fun onFailure(adError: AdError) {
                    Log.d("[APS] onFailure: Amazon APS error: ${adError.message}")
                }
                // 8. Implement OnSuccess callback
                override fun onSuccess(dtbAdResponse: DTBAdResponse) {
                    Log.d("[APS] onSuccess: $slotUUID")
                    val encodedPricePoints: String = SDKUtilities.getPricePoint(dtbAdResponse)
                    val bidInfo = SDKUtilities.getBidInfo(dtbAdResponse)
                    APSAdapter.setBidInfo(slotUUID, encodedPricePoints, bidInfo)
                }
            }
        })
    }
}


// ... inside your code
// 1. Start DT FairBid SDK
FairBid.start(APP_ID, activity)
// and also start APS through the helper class above
AmazonAPS.start(APP_KEY, context)

```

{% endcode %}
{% endtab %}

{% tab title="iOS" %}

### Initializing the APS SDK on iOS

The following process is recommended for initializing the APS SDK in Objective–C implementations on the iOS platform.

1. Start the FairBid SDK.

{% code title="Objective-C" %}

```objectivec
+ [FairBid startWithAppId:options:]

```

{% endcode %}

2. Start the APS SDK with the `APP_KEY` from the APS Portal.

{% code title="Objective-C" %}

```objectivec
- [DTBAds setAppKey:<<APP_KEY>>];

```

{% endcode %}

3. Create an object that conforms to the `id <FYBAPSSlotLoader>` protocol, and assign it to the `[FairBid apsAdapter].slotLoader` property.
4. Implement a Banner ad callback to trigger whenever you call `+ [FYBBanner showBannerInView:position:options:]` for a placement with an APS instance in the waterfall.

{% code title="Objective-C" %}

```objectivec
-loadAPSBannerSlot:width:height:

```

{% endcode %}

5. Implement a Rewarded ad callback to trigger whenever you call `+ [FYBRewarded request:placementId]` for a placement with an APS instance in the waterfall.

{% code title="Objective-C" %}

```objectivec
-loadAPSRewardedSlot:(NSString *)slotUUID

```

{% endcode %}

6. Implement a Interstitial ad callback to trigger whenever you call `+ [FYBInterstitial request:placementId]` for a placement with an APS instance in the waterfall.

{% code title="Objective-C" %}

```objectivec
-loadAPSInterstitialSlot:(NSString *)slotUUID

```

{% endcode %}

#### **Example: iOS Ad Slot Loader**

{% code title="Objective-C" overflow="wrap" %}

```objectivec
- (void)loadAPSBannerSlot:
            (nonnull NSString *)slotUUID
                    width:(NSInteger)width
                   height:(NSInteger)height {
  NSLog(@"[APS] loadAPSBannerSlot: %@, width: "
        @"%li, height: %li",
        slotUUID, (long)width, (long)height);
  DTBAdNetworkInfo *networkInfo =
      [[DTBAdNetworkInfo alloc]
          initWithNetworkName:
              DTBADNETWORK_CUSTOM_MEDIATION];
  DTBAdLoader *loader = [[DTBAdLoader alloc]
      initWithAdNetworkInfo:networkInfo];
  DTBAdSize *size = [[DTBAdSize alloc]
      initBannerAdSizeWithWidth:width
                       height:height
                  andSlotUUID:slotUUID];
  if (!size) {
    NSLog(@"[APS] Failed to create DTBAdSize "
          @"object: (width: %li, height: %li, "
          @"andSlotUUID: %@)",
          (long)width, (long)height, slotUUID);
    return;
  }
  [loader setAdSizes:@[ size ]];
  [loader loadAd:self];
}

// 5. Load Rewarded ad type callback
- (void)loadAPSRewardedSlot:(NSString *)slotUUID {
    NSLog(@"[APS] loadAPSRewardedSlot: %@", slotUUID);

    DTBAdNetworkInfo *networkInfo = [[DTBAdNetworkInfo alloc] initWithNetworkName:DTBADNETWORK_CUSTOM_MEDIATION];
    DTBAdLoader *loader = [[DTBAdLoader alloc] initWithAdNetworkInfo:networkInfo];
    DTBAdSize *size = [[DTBAdSize alloc] initVideoAdSizeWithPlayerWidth:320 height:480 andSlotUUID:slotUUID];
    [loader setAdSizes:@[size]];
    [loader loadAd:self];
}

// 6. Load Interstitials ad type callback
- (void)loadAPSInterstitialSlot:
    (NSString *)slotUUID {
    NSLog(@"[APS] loadAPSInterstitialSlot: %@", slotUUID);

    DTBAdNetworkInfo *networkInfo = [[DTBAdNetworkInfo alloc] initWithNetworkName:DTBADNETWORK_CUSTOM_MEDIATION];
    DTBAdLoader *loader = [[DTBAdLoader alloc] initWithAdNetworkInfo:networkInfo];
    DTBAdSize *size = [[DTBAdSize alloc] interstitialAdSizeWithSlotUUID:slotUUID];
    [loader setAdSizes:@[size]];
    [loader loadAd:self];
}

```

{% endcode %}

7. Create object that conforms to `id <DTBAdCallback>` protocol.
8. Implement the `-onSuccess:` callback, and pass the following parameters back to FairBidSDK by calling `-[[FairBid apsAdapter] setBidInfo:encodedPricePoint:slotUUID:]`.

* `adResponse.bidInfo`
* `adResponse.amznSlots`
* `adResponse.adSize.slotUUID`

9. (Optional) Implement the `-onFailure:` callback to receive error messages when APS cannot fill a slot.

#### **Example: iOS Ad Callbacks**

{% code title="Objective-C" overflow="wrap" %}

```objectivec
// 7. DTBAdCallback
// 8. onSuccess callback
- (void)onSuccess:(DTBAdResponse *)adResponse {
    NSLog(@"[APS] onSuccess: %@", adResponse);
    [[FairBid apsAdapter] setBidInfo:adResponse.bidInfo
                   encodedPricePoint:adResponse.amznSlots
                            slotUUID:adResponse.adSize.slotUUID];
}

// 9. onFailure callback
- (void)onFailure:(DTBAdError *)error {
    NSLog(@"[APS] onFailure: %@", error);
}

```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}

### Initializing the APS SDK on Unity

The following process is recommended for initializing the APS SDK on the Unity platform.

1. Add the following dependencies to `mainTemplate.gradle`:

{% code title="Gradle" %}

```groovy
implementation 'com.amazon.android:aps-sdk:9.9.2'
implementation 'androidx.appcompat:appcompat:1.6.1'
compileOnly 'com.fyber:fairbid-sdk:3.55.0'
```

{% endcode %}

{% hint style="info" %}
**Note**

FairBid is already added as a dependency; however, to access the APIs from the unityLibrary project, add them as a compileOnly dependency.
{% endhint %}

2. To avoid conflicts with duplicate entries for `META-INF/com.android.tools/proguard/coroutines.pro`, add the following code to `launcherTemplate.gradle`:

{% code title="Gradle" %}

```groovy
android {
    packagingOptions {
        exclude 'META-INF/com.android.tools/proguard/coroutines.pro'
    }
}
```

{% endcode %}

3. If your minimum API level is below 19, add the following snippet to `LauncherManifest.xml`:

{% code title="XML" %}

```xml
<uses-sdk tools:overrideLibrary="com.amazon.aps.ads" />

```

{% endcode %}

4. Create the `Assets/APS Compat` directory, and add `AmazonAPS.java` (provided below) to the directory.

{% code title="Java" overflow="wrap" %}

```java
package com.fyber.aps.compat;

import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.util.Log;

import com.amazon.device.ads.AdError;
import com.amazon.device.ads.AdRegistration;
import com.amazon.device.ads.DTBAdCallback;
import com.amazon.device.ads.DTBAdRequest;
import com.amazon.device.ads.DTBAdResponse;
import com.amazon.device.ads.DTBAdSize;
import com.amazon.device.ads.SDKUtilities;
import com.fyber.fairbid.adapters.APSAdapter;

import androidx.annotation.NonNull;


public class AmazonAPS implements APSAdapter.SlotLoader {

    private static AmazonAPS INSTANCE = new AmazonAPS();

    private AmazonAPS() {
    }

    public static void start(String appKey, Context context) {
        // extra check to perform this only once
        if (!AdRegistration.isInitialized()) {
            AdRegistration.getInstance(appKey, context);
            APSAdapter.setSlotLoader(INSTANCE);
        }
    }

    @Override
    public void loadAPSBannerSlot(@NonNull String slotUUID, int width, int height) {
        DTBAdRequest adRequest = new DTBAdRequest();
        adRequest.setSizes(new DTBAdSize(width, height, slotUUID));
        adRequest.loadAd(new DTBAdCallback() {
            @Override
            public void onFailure(@NonNull AdError adError) {
                Log.d("APS", "onFailure: Amazon APS error: " + adError.getMessage());
            }

            @Override
            public void onSuccess(@NonNull DTBAdResponse dtbAdResponse) {
                Log.d("APS", "onSuccess: " + slotUUID);
                String encodedPricePoints = SDKUtilities.getPricePoint(dtbAdResponse);
                String bidInfo = SDKUtilities.getBidInfo(dtbAdResponse);
                APSAdapter.setBidInfo(slotUUID, encodedPricePoints, bidInfo);
            }
        });
    }


    @Override
    public void loadAPSInterstitialSlot(@NonNull String slotUUID) {
        DTBAdRequest adRequest = new DTBAdRequest();
        adRequest.setSizes(new DTBAdSize.DTBInterstitialAdSize(slotUUID));
        adRequest.loadAd(new DTBAdCallback() {
            @Override
            public void onFailure(@NonNull AdError adError) {
                Log.d("APS", "onFailure: Amazon APS error: " + adError.getMessage());
            }

            @Override
            public void onSuccess(@NonNull DTBAdResponse dtbAdResponse) {
                Log.d("APS", "onSuccess: " + slotUUID);
                String encodedPricePoints = SDKUtilities.getPricePoint(dtbAdResponse);
                String bidInfo = SDKUtilities.getBidInfo(dtbAdResponse);
                APSAdapter.setBidInfo(slotUUID, encodedPricePoints, bidInfo);
            }
        });
    }

    @Override
    public void loadAPSRewardedSlot(@NonNull String slotUUID) {
        DTBAdRequest adRequest = new DTBAdRequest();
        adRequest.setSizes(new DTBAdSize.DTBVideo(320, 480, slotUUID));
        adRequest.loadAd(new DTBAdCallback() {
            @Override
            public void onFailure(@NonNull AdError adError) {
                Log.d("APS", "onFailure: Amazon APS error: " + adError.getMessage());
            }

            @Override
            public void onSuccess(@NonNull DTBAdResponse dtbAdResponse) {
                Log.d("APS", "onSuccess: " + slotUUID);
                String encodedPricePoints = SDKUtilities.getPricePoint(dtbAdResponse);
                String bidInfo = SDKUtilities.getBidInfo(dtbAdResponse);
                APSAdapter.setBidInfo(slotUUID, encodedPricePoints, bidInfo);
            }
        });
    }
}
```

{% endcode %}

5. Open the Unity Inspector, and check **Android** on the **Select platforms for plugin** pane.

<div align="left" data-with-frame="true"><img src="/files/uI7PwZxDhHaVpAeMgSfy" alt=""></div>

<br>

6. Start APS by adding the `start` call inside any of your methods in the C#. For example, you can add it right after starting FairBid.

{% code title="C#" overflow="wrap" %}

```csharp
AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
AndroidJavaObject activity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
AndroidJavaClass jc = new AndroidJavaClass("com.fyber.aps.compat.AmazonAPS");
jc.CallStatic("start", "YOUR APP KEY HERE", activity);

```

{% endcode %}

7. Build and run your app.
   {% endtab %}
   {% endtabs %}

## Step 4: Add the APS SDK to your Integration

To integrate the <code class="expression">page.vars.fb\_sdk\_name</code> SDK, follow the instructions on the [Supported Networks](/dt-fairbid/fairbid-sdk/supported-networks) page.

## Step 5: Test Your Integration

Use the DT Test Suite to verify that you have set up your app properly for FairBid mediation. The DT Test Suite is available for Android, iOS, and Unity apps. For more information about using the DT Test Suite, see [Test Suite](/dt-fairbid/fairbid-sdk/tools/test-suite).

<div align="left" data-with-frame="true"><img src="/files/5139af76cb91452787becf8f79f9ac650890bc89" alt="" width="188"></div>


# AppLovin

The purpose of this article is to guide publishers who want to use the DT FairBid SDK to load and display ads from AppLovin via DT FairBid Mediation.

AppLovin currently supports the following [ad types](/dt-exchange/additional-resources/ad-types-and-specification):

* Banner

{% hint style="info" %}
AppLovin banner heights may vary. Devices with larger screens may receive banners with 90 px height. If the banner must be 50 px in height, contact the AppLovin creative team to resize the banner.
{% endhint %}

* Interstitial
* Rewarded (with Google Play Services version 9.0.2+ integrated in your app)

To integrate AppLovin as a DT mediated network:

* [Step 1: Retrieve AppLovin parameters](#step-1-retrieve-applovin-parameters).
* [Step 2: Add AppLovin as a DT mediated network](#step-2-add-applovin-as-a-dt-mediated-network).
* [Step 3: Add the AppLovin SDK to your DT integration](#step-3-add-the-applovin-sdk-to-your-integration).
* [Step 4: Test your integration](#step-4-test-your-integration).

## Step 1: Retrieve AppLovin Parameters

Before retrieving AppLovin parameters, ensure that you have AppLovin ad unit inventory that you want to mediate with DT. For more information about creating AppLovin inventory, see the following AppLovin articles:

1. [Create](https://www.applovin.com/signup) an AppLovin account.
2. [Add](https://developers.applovin.com/en/max/getting-started/#add-your-app) your app in AppLovin.
3. [Create](https://developers.applovin.com/en/max/getting-started/#add-your-ad-unit) inventory for your app in AppLovin.

To add AppLovin as a DT mediated network, retrieve the following parameters from your AppLovin account. Store these parameters in a text file for later use in [Step 2](#step-2-add-applovin-as-a-dt-mediated-network).

<table><thead><tr><th width="148.6171875">PARAMETER</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><code>SDK Key</code></td><td>Unique identifier for your AppLovin account. DT uses this key to initialize the AppLovin Adapter for your apps.</td></tr><tr><td><code>Report Key</code></td><td>Unique identifier for your AppLovin account for reporting purposes. DT uses this key to import performance data from your AppLovin account.</td></tr><tr><td><code>Bundle ID</code></td><td>Unique identifier for your app in the app store.</td></tr><tr><td><code>Zone ID</code></td><td>Unique identifier for the AppLovin ad unit you want DT to mediate.</td></tr></tbody></table>

### Obtaining the SDK Key and Report Key

To obtain the `SDK Key` and `Report Key`:

1. On the AppLovin Dashboard, go to [**Account → General → Keys**](https://dash.applovin.com/o/account#keys).\
   The `SDK Key` and `Report Key` display.

<div align="left" data-with-frame="true"><img src="/files/3716976726c6f98b331ef7c6dfadacce4cc9390c" alt="AppLovin Dashboard Keys page"></div>

<br>

2. Copy the keys, and store the values in a text file. These values are required later in [Step 2](#step-2-add-applovin-as-a-dt-mediated-network) to add AppLovin as a DT mediated network.

### Obtaining the Zone ID

To obtain the `Zone ID`:

1. On the [AppLovin dashboard](https://dash.applovin.com/), go to **App Discovery → Monetization → Manage → Zones**\
   The Zones you created for your app display.

<div align="left" data-with-frame="true"><img src="/files/de50fec29a26897d23cad4e0fdc4e4cbb9bc985a" alt="AppLovin Dashboard Zones page"></div>

<br>

2. For each zone you want DT to mediate, copy the associated `Zone ID`, and store the values in a text file. These values are required later in [Step 2](#step-2-add-applovin-as-a-dt-mediated-network) to add AppLovin as a DT mediated network.

## Step 2: Add AppLovin as a DT Mediated Network

Before you add AppLovin as a mediated network in DT FairBid:

* Ensure that you have access to parameters you retrieved from AppLovin in [Step 1](#step-1-retrieve-applovin-parameters).
* [Add your App](/dt-console/app-management/adding-a-new-app/adding-an-app) using the DT Console.
* Ensure that you [set up a DT Placement](/dt-console/app-management/setting-up-an-existing-app/setting-up-placements) for each AppLovin Zone you want to mediate with DT.

To add AppLovin as a DT mediated network:

1. Log in to the [DT Console](https://console.fyber.com/), and click **App Management**.
2. [Set up](/dt-console/app-management/setting-up-an-existing-app/setting-up-mediated-networks) AppLovin as a mediated network using the parameters you retrieved in [Step 1](#step-1-retrieve-applovin-parameters).

<div align="left" data-with-frame="true"><img src="/files/84cd655f214b1410952237ae0d6293b0ae9a7468" alt="AppLovin parameters for DT integration"></div>

<br>

3. [Set up an ad network instance](/dt-console/app-management/setting-up-an-existing-app/setting-up-instances) for each placement you want DT to mediate. Use the AppLovin `Zone ID` you retrieved in [Step 1](#step-1-retrieve-applovin-parameters) as the **Instance ID**.

## Step 3: Add the AppLovin SDK to your Integration

To integrate the AppLovin SDK, follow the instructions on the [Supported Networks](/dt-fairbid/fairbid-sdk/supported-networks) page.

## Step 4: Test Your Integration

Use the DT Test Suite to verify that you have set up your app properly for FairBid mediation. The DT Test Suite is available for Android, iOS, and Unity apps. For more information about using the DT Test Suite, see [Test Suite](/dt-fairbid/fairbid-sdk/tools/test-suite).

<div align="left" data-with-frame="true"><img src="/files/5139af76cb91452787becf8f79f9ac650890bc89" alt="" width="188"></div>


# Bigo Ads

This article is for publishers who want to use the DT FairBid SDK to load and display ads from BIGO Ads via DT FairBid Mediation.

BIGO Ads currently supports the following [ad types](/dt-exchange/additional-resources/ad-types-and-specification):

* Banner
* Interstitial
* Rewarded

To integrate BIGO Ads as a DT mediated network:

* [Step 1: Retrieve BIGO Ads parameters](#h_01HHEY0ND7XMBRV09JAMM64GV5).
* [Step 2: Add BIGO Ads as a DT mediated network](#h_01HMBMW7WQ5T73CWB3J56GETEV).
* [Step 3: Add the BIGO Ads SDK to your integration](#h_01HYG1BKJBFYNE6A3R0JY64VAS).
* [Step 4: Test your integration](#h_01JD2TBS47XT1JZ5KEA7WCFE88).

## Step 1: Retrieve BIGO Ads Parameters <a href="#h_01hhey0nd7xmbrv09jamm64gv5" id="h_01hhey0nd7xmbrv09jamm64gv5"></a>

Before retrieving BIGO Ads parameters, ensure that you have BIGO Ads ad unit inventory that you want to mediate with DT. For more information about creating BIGO Ads inventory, see the following BIGO ADS articles:

* [Create](https://www.bigossp.com/register) a BIGO Ads account.
* Add your app to BIGO Ads.
* Create placement (Ad Slots) for your app. Ensure that you specify the appropriate **Auction Type**:
  * **Waterfall** for traditional Waterfall
  * **Server Bidding** for SDK Bidding

To set up BIGO Ads as a DT mediated network, locate the following BIGO Ads parameters:

| BIGO ADS PARAMETER | DESCRIPTION                                       |
| ------------------ | ------------------------------------------------- |
| `App ID`           | The unique ID of your app in the BIGO Ads system. |
| `Ad Slot ID`       | The unique ID of your ad placement in BIGO Ads.   |

### Obtaining the App ID <a href="#h_01hgfnv21sgwbe7knqrwav42hy" id="h_01hgfnv21sgwbe7knqrwav42hy"></a>

1. Log in to your [BIGO Ads Dashboard](https://www.bigossp.com/login), and click **Apps and Sites**.
2. Locate your app.

<div align="left" data-with-frame="true"><img src="/files/891xlOGVy0D5kPWbiHai" alt=""></div>

<br>

3. Copy the `APP ID` for your app, and store the value in a text file. This value is required later in [Step 2](#h_01HMBMW7WQ5T73CWB3J56GETEV) to add BIGO Ads as a DT mediated network.

### Obtaining the Ad Slot ID <a href="#h_01hgfnv21sc9npd1xs40zq35qw" id="h_01hgfnv21sc9npd1xs40zq35qw"></a>

1. On the [BIGO Ads Dashboard](https://www.bigossp.com/login), click **Ad Slots**.\
   A list of ad slots associated with all of your apps displays.
2. For each ad slot you want to mediate with DT, copy the `Ad Slot ID`, and save these values to a text file. These values are required later in [Step 2](#h_01HMBMW7WQ5T73CWB3J56GETEV) to add BIGO Ads as a DT mediated network.

<div align="left" data-with-frame="true"><img src="/files/7yjhXECGwwo944CAei4z" alt=""></div>

<br>

## Step 2: Add BIGO Ads as a DT Mediated Network <a href="#h_01hmbmw7wq5t73cwb3j56getev" id="h_01hmbmw7wq5t73cwb3j56getev"></a>

Before you add BIGO Ads as a mediated network in DT FairBid:

* Ensure that you have access to parameters you retrieved from BIGO Ads in [Step 1](#h_01HHEY0ND7XMBRV09JAMM64GV5).
* [Add your App](/dt-console/app-management/adding-a-new-app/adding-an-app) using the DT Console.
* Ensure that you [set up a DT Placement](/dt-console/app-management/setting-up-an-existing-app/setting-up-placements) for each BIGO Ads ad type you want to mediate with DT.

To add BIGO Ads as a DT mediated network:

1. Log in to the [DT Console](https://console.fyber.com/), and click **App Management**.
2. [Set up](/dt-console/app-management/setting-up-an-existing-app/setting-up-mediated-networks) **BIGO Ads** or **BIGO Ads Bidder** as a mediated network using the parameters you retrieved in [Step 1](#h_01HHEY0ND7XMBRV09JAMM64GV5).

<div align="left" data-with-frame="true"><img src="/files/DXIKDZPVA3MxeeH3IB77" alt=""></div>

<br>

3. [Set up an ad network instance](/dt-console/app-management/setting-up-an-existing-app/setting-up-instances) using the BIGO Ads `Ad Slot ID` you retrieved in [Step 1](#h_01HHEY0ND7XMBRV09JAMM64GV5) for the **Instance ID**.

## Step 3: Add the BIGO Ads SDK to Your Integration <a href="#h_01hyg1bkjbfyne6a3r0jy64vas" id="h_01hyg1bkjbfyne6a3r0jy64vas"></a>

To integrate the BIGO Ads SDK, follow the instructions on the [Supported Networks](/dt-fairbid/fairbid-sdk/supported-networks) page.

## Step 4: Test Your Integration <a href="#h_01jd2tbs47xt1jz5kea7wcfe88" id="h_01jd2tbs47xt1jz5kea7wcfe88"></a>

Use the DT Test Suite to verify that you have set up your app properly for FairBid mediation. The DT Test Suite is available for Android, iOS, and Unity apps. For more information about using the DT Test Suite, see [Test Suite](/dt-fairbid/fairbid-sdk/tools/test-suite).

<div align="left" data-with-frame="true"><img src="/files/5139af76cb91452787becf8f79f9ac650890bc89" alt="" width="188"></div>


# Chartboost

This article is for publishers who want to use the DT FairBid SDK to load and display Chartboost ad inventory via the DT FairBid Mediation platform.

Chartboost supports the following [ad types](/dt-exchange/additional-resources/ad-types-and-specification):

* Banner
* Interstitial
* Rewarded

{% hint style="info" %}
DT FairBid SDK 3.45 or later supports Chartboost Banners.
{% endhint %}

To integrate Chartboost as DT mediated network:

* [Step 1: Retrieve Chartboost parameters](#step-1.-retrieve-chartboost-parameters).
* [Step 2: Add Chartboost as a DT mediated network.](#step-2.-add-chartboost-as-a-mediated-network)
* [Step 3: Add the Chartboost SDK to your integration.](#step-3.-add-the-chartboost-sdk-to-your-dt-integration)
* [Step 4: Test Your integration](#step-4-test-your-integration).

## Step 1. Retrieve Chartboost Parameters

Before retrieving Chartboost parameters, ensure that you have Chartboost ad unit inventory that you want to mediate with DT. For more information about creating Chartboost inventory, see the following Chartboost articles:

* [Create](https://docs.chartboost.com/en/monetization/get-started/#create--set-up-a-free-account) a Chartboost account.
* [Add](https://docs.chartboost.com/en/monetization/publishing/adding-your-first-app-and-campaign/#adding-apps) your app to Chartboost.
* [Create](https://docs.chartboost.com/en/monetization/publishing/ad-locations/) an ad location for your app in Chartboost.

To set up Chartboost as a DT mediated network, locate the following Chartboost parameters:

| CHARTBOOST PARAMETER | DESCRIPTION                                                                                                                                                  |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `APP ID`             | Unique identifier for your app in the Chartboost system.                                                                                                     |
| `APP SIGNATURE`      | Unique secret signature for your app in the Chartboost system. Chartboost uses this to verify that you are the owner of your app.                            |
| `User ID`            | Unique identifier for your account in the Chartboost dashboard.                                                                                              |
| `User Signature`     | Uunique secret signature for your user account in the Chartboost Dashboard. Chartboost uses this to verify that you are allowed to access account analytics. |
| `Named Location`     | Specific points in your app where you allow the display of various ad types.                                                                                 |

To obtain the Chartboost parameters for DT:

1. From the Chartboost dashboard, click **Monetization**.
2. Select your app.
3. Under **App information**, copy the `APP ID` and `APP SIGNATURE`, and save these values to a text file. These values are required later in [Step 2](#step-2.-add-chartboost-as-a-mediated-network) to add Chartboost as a DT mediated network.

<div align="left" data-with-frame="true"><img src="/files/DQVNfR4kDZVZDFq5vq6I" alt=""></div>

<br>

4. Click **Set up Mediation**.
5. Under **Authentication**, copy the `User ID` and `User Signature`, and save these values to a text file. These values are required later in Step 2 to add Chartboost as a DT mediated network.

<div align="left" data-with-frame="true"><img src="/files/yUbufaKeme4MVBElDLAB" alt=""></div>

<br>

## Step 2. Add Chartboost as a Mediated Network

Before you add Chartboost as a DT mediated network:

* Ensure that you have access to parameters you retrieved from Chartboost in [Step 1](#step-1.-retrieve-chartboost-parameters).
* [Add your App](/dt-console/app-management/adding-a-new-app/adding-an-app) using the DT Console.
* Ensure that you [set up a DT Placement](/dt-console/app-management/setting-up-an-existing-app/setting-up-placements) for each Chartboost ad location you want to mediate with DT.

To add Chartboost as a DT mediated network:

1. Log in to the [DT Console](https://console.fyber.com/), and click **App Management**.
2. [Set up](/dt-console/app-management/setting-up-an-existing-app/setting-up-mediated-networks) Chartboost as a DT mediated network using parameters you retrieved in [Step 1](#step-1.-retrieve-chartboost-parameters).

<div align="left" data-with-frame="true"><img src="/files/tXT6FbQuyEafhQ9cXJFq" alt=""></div>

<br>

3. [Set up an ad network instance](/dt-console/app-management/setting-up-an-existing-app/setting-up-instances) using the Chartboost `Named Location` you retrieved in [Step 1](#step-1.-retrieve-chartboost-parameters) for the **Instance ID**.

## Step 3. Add the Chartboost SDK to your DT Integration

To integrate the Chartboost SDK, follow the instructions on the [Supported Networks](/dt-fairbid/fairbid-sdk/supported-networks) page.

## Step 4: Test Your Integration

Use the DT Test Suite to verify that you have set up your app properly for FairBid mediation. The DT Test Suite is available for Android, iOS, and Unity apps. For more information about using the DT Test Suite, see [Test Suite](/dt-fairbid/fairbid-sdk/tools/test-suite).

<div align="left" data-with-frame="true"><img src="/files/5139af76cb91452787becf8f79f9ac650890bc89" alt="" width="188"></div>


# Google Ad Manager

The purpose of this article is to guide publishers who want to add Google Ad Manager as an ad network for mediation with DT.

Google Ad Manager currently the following [ad types](/dt-exchange/additional-resources/ad-types-and-specification):

* Banner
* Interstitial
* Rewarded

To integrate Google Ad Manager as a DT mediated network:

* [Step 1: Retrieve Google Ad Manager parameters](#h_01j50nr70gaqkb6rxk12s7eh1f).
* [Step 2: Add Google Ad Manager as a DT mediated network](#h_01j50nr70g3dkjh95fy45rhk9m).
* [Step 3: Add the Google Ad Manager SDK to your integration](#h_01j5s45m7z2gca68je628r331h).
* [Step 4: Test your integration](#h_01jhk5bbr7wwxayy509cmh8zhp).

## Step 1. Retrieve Google Ad Manager Parameters <a href="#h_01j50nr70gaqkb6rxk12s7eh1f" id="h_01j50nr70gaqkb6rxk12s7eh1f"></a>

Before retrieving Google Ad Manager parameters, ensure that you have Google Ad Manager ad unit inventory that you want to mediate with DT. For more information about creating Google Ad Manager inventory, see the following Google Ad Manager articles:

* [Create your Google Ad Manager Account](https://admanager.google.com/home/contact-us/).
* [Add your app to Google Ad Manager](https://support.google.com/admanager/answer/6316896?hl=en\&ref_topic=10130160\&sjid=15898576676715205199-NA).
* [Create an inventory for your app in Google Ad Manager](https://support.google.com/admanager/topic/7505593?hl=en\&ref_topic=7506089\&sjid=7192912598589236407-NC).

To set up Google Ad Manager as a DT mediated network, locate the following Google Ad Manager parameters:

| PARAMETER    | DESCRIPTION                                             |
| ------------ | ------------------------------------------------------- |
| `App ID`     | Unique ID for your app in the Google Ad Manager.        |
| `Ad Unit ID` | Unique identifier for the ad unit in Google Ad Manager. |
| `Bundle ID`  | Unique identifier for your app in the store.            |

For more information about how to locate Google Ad Manager parameters, see [Find an app ID or ad unit ID](https://support.google.com/admanager/answer/15014197?hl=en\&sjid=15566666120618356982-NC). Once you locate the indicated Google Ad Manager parameters, copy and store these parameters in a text file to reference these values when you add the network to your app in the DT Console. Delete the text file once you finish adding the network in the DT Console.

## Step 2: Add Google Ad Manager as a DT Mediated Network <a href="#h_01j50nr70g3dkjh95fy45rhk9m" id="h_01j50nr70g3dkjh95fy45rhk9m"></a>

Before you add Google Ad Manager as a mediated network in DT FairBid:

* Ensure that you have access to parameters you retrieved from Google Ad Manager in [Step 1](#h_01j50nr70gaqkb6rxk12s7eh1f).
* [Add your App](/dt-console/app-management/adding-a-new-app/adding-an-app) using the DT Console.
* Ensure that you [set up a DT Placement](/dt-console/app-management/setting-up-an-existing-app/setting-up-placements) for each Google Ad Manager ad type you want to mediate with DT.

1. Log in to the [DT Console](https://mui-qa.fyber.com/inventory/publisher?startDate=2021-07-07\&endDate=2021-07-13) and click **App Management**.
2. [Set up](/dt-console/app-management/setting-up-an-existing-app/setting-up-mediated-networks) Google Ad Manager as a mediated network using the parameters you retrieved in [Step 1](#h_01j50nr70gaqkb6rxk12s7eh1f).

<div align="left" data-with-frame="true"><img src="/files/GaxL1BFi8YbyOkvXSN9z" alt=""></div>

<br>

3. [Set up an ad network instance](/dt-console/app-management/setting-up-an-existing-app/setting-up-instances) for each Google Ad Manager placement you want to mediate with DT. Use the Google Ad Manager Ad Unit ID you retrieved in [Step 1](#h_01j50nr70gaqkb6rxk12s7eh1f) as the **Instance ID**.

## Step 3. Add the Google Ad Manager SDK to your DT Integration <a href="#h_01j5s45m7z2gca68je628r331h" id="h_01j5s45m7z2gca68je628r331h"></a>

To integrate the Google Ad Manager SDK, follow the instructions on the [Supported Networks](/dt-fairbid/fairbid-sdk/supported-networks) page.

## Step 4: Test Your Integration <a href="#h_01jhk5bbr7wwxayy509cmh8zhp" id="h_01jhk5bbr7wwxayy509cmh8zhp"></a>

Use the DT Test Suite to verify that you have set up your app properly for FairBid mediation. The DT Test Suite is available for Android, iOS, and Unity apps. For more information about using the DT Test Suite, see [Test Suite](/dt-fairbid/fairbid-sdk/tools/test-suite).

<div align="left" data-with-frame="true"><img src="/files/5139af76cb91452787becf8f79f9ac650890bc89" alt="" width="188"></div>


# HyprMX

This article is for publishers who want to use the DT FairBid SDK to load and display ads from HyprMX via DT FairBid Mediation.

HyprMX currently supports the following [ad types](/dt-exchange/additional-resources/ad-types-and-specification):

* Banner
* Interstitial
* Rewarded

To integrate HyprMX as DT mediated network:

1. [Step 1: Retrieve HyprMX parameters](#step-1-retrieve-hyprmx-parameters).
2. [Step 2: Add HyprMX as a mediated network](#step-2-add-hyprmx-as-a-mediated-network).
3. [Step 3: Add the HyprMX SDK to your integration](#step-3-adding-the-hyprmx-sdk-to-your-integration).
4. [Step 4: Test your integration](#step-4-test-your-integration).

{% hint style="info" %}
DT FairBid SDK 3.21.1 or later supports HyprMX Banners.
{% endhint %}

## Step 1: Retrieve HyprMX Parameters

HyprMX is a managed service that provides placements for your application. To create an account with them, contact HyprMX at <integration@hyprmx.com> . Once HyprMX has created your account, you can retrieve the required parameters to integrate HyprMx in your DT account.

From your HyprMX account, locate the following parameters. Store these values in a text file. These values are required later in [Step 2](#step-2-add-hyprmx-as-a-mediated-network) to add HyprMX as a DT mediated network.

| HYPRMX PARAMETER    | DESCRIPTION                                                      |
| ------------------- | ---------------------------------------------------------------- |
| `Distributor ID`    | The unique identifier of the distributor in the HyprMX system.   |
| `Reporting API Key` | The unique identifier of the Reporting API in the HyprMX system. |
| `Placement Name`    | The name of the placement in the HyprMX system.                  |

## Step 2: Add HyprMX as a Mediated Network

Before adding HyprMX as a DT mediated network:

* Ensure that you have access to parameters you retrieved from HyprMX in [Step 1](#step-1-retrieve-hyprmx-parameters).
* [Add your App](/dt-console/app-management/adding-a-new-app/adding-an-app) using the DT Console.
* Ensure that you [set up a DT Placement](/dt-console/app-management/setting-up-an-existing-app/setting-up-placements) for each HyprMX ad type you want to mediate with DT.

To add HyprMX as a DT mediated network:

1. Log in to the [DT Console](https://console.fyber.com/), and click App Management.
2. [Set up](/dt-console/app-management/setting-up-an-existing-app/setting-up-mediated-networks) HyprMX as a mediated network using the parameter you retrieved in [Step 1](#step-1-retrieve-hyprmx-parameters).
3. [Set up an ad network instance](/dt-console/app-management/setting-up-an-existing-app/setting-up-instances) using the HyprMx Placement Name for the Instance ID.

## Step 3: Adding the HyprMX SDK to your Integration

To integrate the HyprMX SDK, follow the instructions on the [Supported Networks](/dt-fairbid/fairbid-sdk/supported-networks) page.

## Step 4: Test Your Integration

Use the DT Test Suite to verify that you have set up your app properly for FairBid mediation. The DT Test Suite is available for Android, iOS, and Unity apps. For more information about using the DT Test Suite, see [Test Suite](/dt-fairbid/fairbid-sdk/tools/test-suite).

<div align="left" data-with-frame="true"><img src="/files/5139af76cb91452787becf8f79f9ac650890bc89" alt="" width="188"></div>


# InMobi

This article is for publishers who want to use the DT FairBid SDK to load and display ads from InMobi via DT FairBid Mediation.

InMobi currently supports the the following [ad types](/dt-exchange/additional-resources/ad-types-and-specification):

* Banner
* Interstitial
* Rewarded

To integrate InMobi as a DT mediated network:

* [Step 1: Retrieve your InMobi parameters](#step-1-retrieve-inmobi-parameters).
* [Step 2: Add InMobi as a DT mediated network](#step-2-add-inmobi-as-a-mediated-network).
* [Step 3: Add the InMobi SDK to your integration](#obtaining-the-placement-id).
* [Step 4: Test your integration](#step-4-test-your-integration).

## Step 1: Retrieve InMobi Parameters

Before retrieving InMobi parameters, ensure that you have InMobi ad unit inventory that you want to mediate with DT. For more information about creating InMobi inventory, see the following InMobi articles:

* [Create](https://publisher.inmobi.com/signup) an InMobi account.
* [Create](https://support.inmobi.com/monetize/publisher-dashboard/inventory-tab/inventory-settings#add-inventory) an app in InMobi with the following considerations:
  * Verify the target audience to confirm if the application is specifically intended for children under 16.
  * Whether to authorize InMobi to access device location using *Location Permission*.
  * Consider using the Block Setting option selection if you are opting to enforce such restrictions.
* [Create](https://support.inmobi.com/monetize/publisher-dashboard/inventory-tab/inventory-settings#create-placements) a placements in InMobi for traditional waterfall mediation or SDK Bidding (Audience Bidding).

To set up InMobi as a DT mediated network, locate the following InMobi parameters:

| INMOBI PARAMETER | REQUIRED FOR                                    | DESCRIPTION                                                                                                                                    |
| ---------------- | ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `User Name`      | <ul><li>Waterfall</li></ul>                     | Your user name, as defined in the InMobi system, that you use to log in to your InMobi account.                                                |
| `ACCOUNT ID`     | <ul><li>Waterfall</li><li>SDK Bidding</li></ul> | The unique ID of your account in the InMobi system.                                                                                            |
| `API Key`        | <ul><li>Waterfall</li></ul>                     | A unique identifier for your InMobi account that allows the DT FairBid mediation platform to import performance data from your InMobi account. |
| `Placement ID`   | <ul><li>Waterfall</li><li>SDK Bidding</li></ul> | The unique Name/ID of a placement in the InMobi system.                                                                                        |

### Obtaining the InMobi Account ID

1. Log in to your [InMobi account](https://login.microsoftonline.com/99b97e0e-6a13-4d32-b39a-1a2a28aa6ba8/oauth2/v2.0/authorize?redirect_uri=https%3A%2F%2Fpublisher.inmobi.com%2Fauth%2Fopenid%2Freturn\&client_id=f464a21e-8c1a-4717-aa29-86f89624762d\&scope=openid+profile\&response_type=id_token\&response_mode=form_post\&nonce=8f4vUXm084), and go to **Finance → Payment Settings → Payment Information**.\
   Your InMobi account information displays.

<div align="left" data-with-frame="true"><img src="/files/ChqOsylTyk2tsT41UVIW" alt=""></div>

<br>

2. Copy the `ACCOUNT ID`, and store the value in a text file. This value is required later in [Step 2](#h_01HN007B7WTB7QNA9P66MA0P94) to add InMobi as a DT mediated network.

### Obtaining the API Key

1. Log in to your [InMobi account](https://login.microsoftonline.com/99b97e0e-6a13-4d32-b39a-1a2a28aa6ba8/oauth2/v2.0/authorize?redirect_uri=https%3A%2F%2Fpublisher.inmobi.com%2Fauth%2Fopenid%2Freturn\&client_id=f464a21e-8c1a-4717-aa29-86f89624762d\&scope=openid+profile\&response_type=id_token\&response_mode=form_post\&nonce=8f4vUXm084).
2. From the the drop-down at the top right-hand corner of your InMobi admin panel, go to **Account Settings → API Key → Generate Key**.\
   A new API Key displays.

<div align="left" data-with-frame="true"><img src="/files/xxuKayVx6B6SzEw1dj9G" alt=""></div>

3. Copy the generated key, and store the value in a text file. This value is required later in [Step 2](#h_01HN007B7WTB7QNA9P66MA0P94) to add InMobi as a DT mediated network.

#### Obtaining the Placement ID

1. Log in to your [InMobi account](https://login.microsoftonline.com/99b97e0e-6a13-4d32-b39a-1a2a28aa6ba8/oauth2/v2.0/authorize?redirect_uri=https%3A%2F%2Fpublisher.inmobi.com%2Fauth%2Fopenid%2Freturn\&client_id=f464a21e-8c1a-4717-aa29-86f89624762d\&scope=openid+profile\&response_type=id_token\&response_mode=form_post\&nonce=8f4vUXm084), and go to **Inventory → Inventory Settings.** .
2. Select your App.\
   A list of associated placements display.
3. For each placement you want to mediate with DT, copy the **Placement ID** to a text file. These values are required later in [Step 2](#h_01HN007B7WTB7QNA9P66MA0P94) to add InMobi as a DT mediated network.

<div align="left" data-with-frame="true"><img src="/files/6u4ykRUkVcTiCD8cUQOs" alt=""></div>

## Step 2: Add InMobi as a Mediated Network

Before you add InMobi as a DT mediated network:

* Ensure that you have access to parameters you retrieved from InMobi in [Step 1](#h_01J9W9C31TWB39TK3MG01T6EXE).
* [Add your App](/dt-console/app-management/adding-a-new-app/adding-an-app) using the DT Console.
* Ensure that you [set up a DT Placement](/dt-console/app-management/setting-up-an-existing-app/setting-up-placements) for each InMobi ad type you want to mediate with DT.

To add InMobi as a mediated network:

1. Log in to the [DT Console](https://console.fyber.com/), and click **App Management**.
2. [Set up](/dt-console/app-management/setting-up-an-existing-app/setting-up-mediated-networks) **InMobi** or **InMobi bidder** as a mediated network using the parameters you retrieved in [Step 1](#h_01J9W9C31TWB39TK3MG01T6EXE).

<div align="left" data-with-frame="true"><img src="/files/L5l0Ct16WpT4Az9yIKfO" alt=""></div>

<div align="left" data-with-frame="true"><img src="/files/FGtfbz3SgP2yDS2d8ztA" alt=""></div>

3. [Set up an ad network instance](/dt-console/app-management/setting-up-an-existing-app/setting-up-instances) for each ad type you want to mediate with DT. Use the InMobi `Placement ID` you retrieved in [Step 1](#h_01J9W9C31TWB39TK3MG01T6EXE) for the **Instance ID**.

## Step 3: Adding the InMobi SDK to your Integration

To integrate the InMobi SDK, follow the instructions on the [Supported Networks](/dt-fairbid/fairbid-sdk/supported-networks) page.

## Step 4: Test Your Integration

Use the DT Test Suite to verify that you have set up your app properly for FairBid mediation. The DT Test Suite is available for Android, iOS, and Unity apps. For more information about using the DT Test Suite, see [Test Suite](/dt-fairbid/fairbid-sdk/tools/test-suite).

<div align="left" data-with-frame="true"><img src="/files/5139af76cb91452787becf8f79f9ac650890bc89" alt="" width="188"></div>


# ironSource

This article is for publishers who want to use the DT FairBid SDK to load and display ads from ironSource via DT FairBid mediation.

ironSource currently supports the following [ad types](/dt-exchange/additional-resources/ad-types-and-specification):

* Interstitial
* Rewarded

To integrate ironSource as DT mediated network:

* [Step 1: Retrieve ironSource parameters](#h_01J50P77B3CYYMEAZ36BQEC30R).
* [Step 2: Add ironSource as a DT mediated network](#h_01J50P77B39H7QKGYQMHM8TREW).
* [Step 3: Add the ironSource SDK to your integration](#h_01J50P77B3RENMP2JVMGK304PA).
* [Step 4: Test your integration](#h_01JD5DY1XW3XZ76DC1ECH5P1PE).

## Step 1: Retrieve ironSource Parameters

Before retrieving ironSource parameters, ensure that you have ironSource ad unit inventory that you want to mediate with DT. For more information about creating ironSource inventory, see the following ironSource articles:

* [Create](https://developers.is.com/ironsource-mobile/general/create-an-account-ironsource-ads/) an ironSource account.
* [Add](https://developers.is.com/ironsource-mobile/general/how-to-add-an-app-to-your-account/) your app to ironSource.
* [Create](https://developers.is.com/ironsource-mobile/general/how-to-add-an-app-to-your-account/#step-4) ad units in ironSource.

To set up ironSource as a DT mediated network, locate the following ironSource parameters:

| PARAMETER       | DESCRIPTION                                                                                      |
| --------------- | ------------------------------------------------------------------------------------------------ |
| `App Key`       | Unique ID for your app in the ironSource system.                                                 |
| `API User Name` | The User Name for your ironSource account.                                                       |
| `Secret Key`    | Unique identifier detailing the relationship between your account and ironSource.                |
| `Refresh Token` | Credential used to obtain a new access token without requiring you to re-enter your credentials. |
| `Ad Unit ID`    | Unique identifier for the ad unit you want to mediate in DT FairBid.                             |

### Obtaining the App Key

1. On the [ironSource dashboard](https://platform.ironsrc.com/platform/dashboard), go to **Apps**.\
   A list of your apps display along with the associated App Keys.

<div align="left" data-with-frame="true"><img src="/files/OEsqtozy5XM5o0B2tSmC" alt=""></div>

2. Copy the `App Key`. This value is required later in [Step 2](#h_01J50P77B39H7QKGYQMHM8TREW) to add ironSource as a DT mediated network.

### Obtaining the API User Name, Secret Key, and Refresh Token

Obtain the `API User Name`, `Secret Key`, and `Refresh Token` from your ironSource user account settings:

1. From the ironSource dashboard, click the dropdown menu next to your user name, and select **My Account**.\
   The **User Info** tab displays basic account details.

<div align="left" data-with-frame="true"><img src="/files/pw2CAhYBSKkUlop6iWLC" alt=""></div>

2. Copy the **User Name**. This value is required later in [Step 2](#h_01J50P77B39H7QKGYQMHM8TREW) to add ironSource as a DT mediated network.
3. Select the **API** tab.\
   The ironSource API credentials appear.

<div align="left" data-with-frame="true"><img src="/files/ucCuNdfaOjpNzWEf7P9L" alt=""></div>

4. Copy the `Secret Key` and `Refresh Token`. These values are required later in [Step 2](#h_01J50P77B39H7QKGYQMHM8TREW) to add ironSource as a DT mediated network.

### Obtaining Ad Unit IDs

To locate ironSource Ad Unit IDs, see the ironSource article about [How to manage your ad units](https://developers.is.com/ironsource-mobile/general/how-to-manage-your-ad-units/#step-1). For each placement you want to mediate in DT FairBid, copy the `Ad Unit ID`. These values are required later in [Step 2](#h_01J50P77B39H7QKGYQMHM8TREW) to add ironSource as a DT mediated network.

## Step 2: Add ironSource as a Mediated Network

Before you add ironSource as a mediated network in DT FairBid:

* Ensure that you have access to the parameters you retrieved from ironSource in [Step 1](#h_01J50P77B3CYYMEAZ36BQEC30R).
* [Add your App](/dt-console/app-management/adding-a-new-app/adding-an-app) using the DT Console.
* Ensure that you [set up a DT Placement](/dt-console/app-management/setting-up-an-existing-app/setting-up-placements) for each ironSource ad type you want to mediate with DT.

To add ironSource as a DT mediated network:

1. Log in to the [DT Console](https://console.fyber.com/), and click **App Management**.
2. [Set up](/dt-console/app-management/setting-up-an-existing-app/setting-up-mediated-networks) ironSource as a mediated network using the parameters you retrieved in [Step 1](#h_01J50P77B3CYYMEAZ36BQEC30R).

<div align="left" data-with-frame="true"><img src="/files/Cuuq283TrQz7BXNAPuG9" alt=""></div>

3. [Set up an ad network instance](/dt-console/app-management/setting-up-an-existing-app/setting-up-instances) for each ad type you want to mediate with DT. Use the ironSource `Ad Unit ID` you retrieved in [Step 1](#h_01J50P77B3CYYMEAZ36BQEC30R) as the **Instance ID**.

## Step 3: Adding the ironSource SDK to your Integration

To integrate the ironSource SDK, follow the instructions on the [Supported Networks](/dt-fairbid/fairbid-sdk/supported-networks) page.

{% hint style="info" %}
If you use ProGuard, follow the [ironSource instructions for SDK integration](https://developers.ironsrc.com/ironsource-mobile/android/android-sdk/).
{% endhint %}

## Step 4: Test Your Integration

Use the DT Test Suite to verify that you have set up your app properly for FairBid mediation. The DT Test Suite is available for Android, iOS, and Unity apps. For more information about using the DT Test Suite, see [Test Suite](/dt-fairbid/fairbid-sdk/tools/test-suite).

<div align="left" data-with-frame="true"><img src="/files/5139af76cb91452787becf8f79f9ac650890bc89" alt="" width="188"></div>


# Liftoff Monetize

This article is for publishers who want to use the DT FairBid SDK to load and display ads from Liftoff Monetize via DT FairBid mediation.

Liftoff Monetize currently supports the following [ad types](/dt-exchange/additional-resources/ad-types-and-specification):

* Banner
* Interstitial
* Rewarded

To integrate Liftoff Monetize as an DT mediated network:

* [Step 1: Locate Liftoff Monetize parameters](#step-1-locate-liftoff-monetize-parameters).
* [Step 2: Add Liftoff Monetize as a DT mediated network](#step-2-add-liftoff-monetize-as-a-dt-mediated-network):
  * [Add Liftoff Monetize for Waterfall mediation](#adding-liftoff-monetize-as-waterfall-network).\
    This allows for traditional waterfall mediation with Liftoff Monetize. Ensure that your app and bidding placements have been added to the Liftoff Monetize network.
  * Add Liftoff Monetize for Bidding mediation:
    * [Add Liftoff Monetize as a manually managed DT mediated network](#adding-liftoff-monetize-as-a-manually-managed-bidding-network).\
      This allows DT to include Liftoff Monetize in bidding mediation. Ensure that your app and bidding placements have been added to the Liftoff Monetize network.
    * [Add Liftoff Monetize as an automatically managed DT mediate network](#adding-liftoff-monetize-as-an-automatically-managed-bidding-network).\
      This allows DT to include Liftoff Monetize in bidding mediation. DT adds your app and bidding placements to the Liftoff Monetize network on your behalf.
* [Step 3: Add the LiftoffMonetize/Vungle SDK to your DT integration](#step-3-add-the-liftoff-monetize-sdk-to-your-integration).
* [Step 4: Test your integration](#step-4-test-your-integration).

## Step 1: Locate Liftoff Monetize Parameters

Depending on the type of mediation you intend to use, adding Liftoff Monetize as a mediated network requires specific parameters from the Liftoff Monetize Dashboard. Before you can locate these parameters, use the following table to ensure that you have completed any app setup tasks in the Liftoff Monetize Dashboard.

<table><thead><tr><th width="187">Liftoff Monetize Tasks</th><th align="center">Waterfall</th><th align="center">Bidding - Manual</th><th align="center">Bidding - Automatic</th></tr></thead><tbody><tr><td><a href="https://support.vungle.com/hc/en-us/articles/203610124-Start-Monetizing-With-Liftoff">Create</a> a Liftoff Monetize Account.</td><td align="center"><i class="fa-check">:check:</i></td><td align="center"><i class="fa-check">:check:</i></td><td align="center"><i class="fa-check">:check:</i></td></tr><tr><td><a href="https://support.vungle.com/hc/en-us/articles/115000493152-Add-and-Edit-Your-App-in-the-Dashboard">Add</a> your app to Liftoff Monetize.</td><td align="center"><i class="fa-check">:check:</i></td><td align="center"><i class="fa-check">:check:</i></td><td align="center"></td></tr><tr><td><a href="https://support.vungle.com/hc/en-us/articles/360041566292-Create-or-Edit-a-Placement">Create</a> Placements in Liftoff Monetize for traditional waterfall mediation.</td><td align="center"><i class="fa-check">:check:</i></td><td align="center"></td><td align="center"></td></tr><tr><td><a href="https://support.vungle.com/hc/en-us/articles/360041566292-Create-or-Edit-a-Placement">Create</a> Liftoff Monetize placements for bidding mediation.</td><td align="center"></td><td align="center"><i class="fa-check">:check:</i></td><td align="center"></td></tr></tbody></table>

To enable Liftoff Monetize as a DT mediated ad network, locate the following Liftoff Monetize parameters:

<table><thead><tr><th width="191.12109375">Parameter</th><th width="277.1171875">Description</th><th width="95.04296875" align="center">Waterfall</th><th width="107.21875" align="center">Bidding - Manual</th><th align="center">Bidding - Automatic</th></tr></thead><tbody><tr><td><code>App ID</code></td><td>Unique identifier of your application in the Liftoff Monetize system.</td><td align="center"><i class="fa-check">:check:</i></td><td align="center"><i class="fa-check">:check:</i></td><td align="center"></td></tr><tr><td><code>Placement Reference ID</code></td><td>Unique identifier of the ad unit in the Liftoff Monetize system.</td><td align="center"><i class="fa-check">:check:</i></td><td align="center"><i class="fa-check">:check:</i></td><td align="center"></td></tr><tr><td><code>Reporting API Key</code></td><td>Your unique key for the Liftoff Monetize API.</td><td align="center"><i class="fa-check">:check:</i></td><td align="center"></td><td align="center"></td></tr><tr><td><code>Secret Token</code></td><td>Your unique key for your Liftoff Monetize publisher self-serve API.</td><td align="center"></td><td align="center"></td><td align="center"><i class="fa-check">:check:</i></td></tr></tbody></table>

### Locating the App ID

From the [Liftoff Monetize Dashboard](https://publisher.vungle.com/login2), click the **Applications** drop-down and select your app.\
The **App Settings** appear and include the App ID.

<div align="left" data-with-frame="true"><img src="/files/cfVrJyqtSnPyFXIgBcZA" alt=""></div>

### Locating the Placement Reference ID

From the [Liftoff Monetize Dashboard](https://publisher.vungle.com/login2), click the **Applications** drop-down, select your app, and then click **Placements**.\
The **Placements** page appears and includes the Placement Reference ID for all app placements.

<div align="left" data-with-frame="true"><img src="/files/G6IEBb6YyxbYg9Zn1Iui" alt=""></div>

### Locating the API Key & Secret Token

From the [Liftoff Monetize Dashboard](https://publisher.vungle.com/login2), click **My Account** in the upper-right corner of the screen.\
The **Overview** page appears and includes API Key and Secret Token.

<div align="left" data-with-frame="true"><img src="/files/HghIRBWjpEjPYYjlWtyu" alt=""></div>

## Step 2: Add Liftoff Monetize as a DT Mediated Network

Before you add Liftoff Monetize as a mediated network in DT FairBid, complete the following tasks in the [DT Console](https://console.fyber.com/):

* Add your App to the DT ecosystem. For more information, see [Adding an App](/dt-console/app-management/adding-a-new-app/adding-an-app).
* Ensure that you have a DT Placement for each Mintegral ad type you want to mediate with DT. For more information, see [Setting Up Placements](/dt-console/app-management/setting-up-an-existing-app/setting-up-placements).

### Adding Liftoff Monetize as Waterfall Network

To add Liftoff Monetize as a DT mediated network:

1. From the [DT Console](https://console.fyber.com/), go to **Monetization → App Management**, locate the **Network** tab for your app, and click **Add network**.\
   The list of available networks appears.

<div align="left" data-with-frame="true"><img src="/files/ZB7p5rgT4HBaVTu4djPy" alt=""></div>

2. Click the **Liftoff Monetize** tile and enter the Liftoff Monetize parameters for Waterfall integration from [Step 1](#step-1-locate-liftoff-monetize-parameters).\
   For more information, see [Adding a Waterfall Network](/dt-console/app-management/setting-up-an-existing-app/setting-up-mediated-networks#adding-a-waterfall-network).

{% hint style="info" %}
Some networks offer both traditional waterfall and programmatic bidding. Networks that offer programmatic bidding appear as separate tiles labeled specifically for bidding. For waterfall mediation, do not select the *bidder* version of the network.
{% endhint %}

<div align="left" data-with-frame="true"><figure><img src="/files/RUPvNfKLcXHAbnipLTjF" alt=""><figcaption></figcaption></figure></div>

3. Create a Waterfall network instance for each Liftoff Monetize placement you want DT to mediate. Use the Liftoff Monetize Placement Reference ID you located in [Step 1](#step-1-locate-liftoff-monetize-parameters) as the **Instance ID**.\
   For more information, see [Adding a Waterfall Instance](/dt-console/app-management/setting-up-an-existing-app/setting-up-instances#adding-a-waterfall-instance).

### Adding Liftoff Monetize as a Manually Managed Bidding Network

To add Liftoff Monetize as a DT mediated network:

1. From the [DT Console](https://console.fyber.com/), go to **Monetization → App Management**, locate the **Network** tab for your app, and click **Add network**.\
   The list of available networks appears.

<div align="left" data-with-frame="true"><img src="/files/hQcENbmf4bK6cPthROMI" alt=""></div>

2. Click the **Liftoff Monetize bidder** tile.\
   The **Add network** form for **Liftoff Monetize bidder** appears.\
   For more information, see [Adding a Manually Managed Bidding Network](/dt-console/app-management/setting-up-an-existing-app/setting-up-mediated-networks#adding-a-manually-managed-bidding-network).

{% hint style="info" %}
Networks that support programmatic bidding appear as separate tiles labeled specifically for bidding. To offer your placements for bidding, make sure you select the *bidder* version of the network—in this case, **Liftoff Monetize bidder**.
{% endhint %}

<div align="left" data-with-frame="true"><img src="/files/2yEnkTaz4jFXTkwYMI25" alt=""></div>

3. Click **Manually managed** and enter the Liftoff Monetize parameters for manual management from [Step 1](#step-1-locate-liftoff-monetize-parameters).
4. Create a Bidding network instance for each Liftoff Monetize placement you want DT to mediate. Use the Liftoff Monetize Placement Reference ID you located in [Step 1](#step-1-locate-liftoff-monetize-parameters) as the **Instance ID**.\
   For more information, see [Manually Adding a Bidding Instance](/dt-console/app-management/setting-up-an-existing-app/setting-up-instances#manually-adding-a-bidding-instance).

### Adding Liftoff Monetize as an Automatically Managed Bidding Network

To add Liftoff Monetize for automatically managed bidding mediation:

1. From the [DT Console](https://console.fyber.com/), go to **Monetization → App Management**, locate the **Network** tab for your app, and click **Add network**.\
   The list of available networks appears.

<div align="left" data-with-frame="true"><img src="/files/hQcENbmf4bK6cPthROMI" alt=""></div>

2. Click the **Liftoff Monetize bidder** tile.\
   The **Add network** form for **Liftoff Monetize bidder** appears.\
   For more information, see [Adding an Automatically Managed Bidding Network](/dt-console/app-management/setting-up-an-existing-app/setting-up-mediated-networks#adding-an-automatically-managed-bidding-network).

{% hint style="info" %}
Networks that support programmatic bidding appear as separate tiles labeled specifically for bidding. To offer your placements for bidding, make sure you select the *bidder* version of the network—in this case, **Liftoff Monetize Bidder**
{% endhint %}

<div align="left" data-with-frame="true"><img src="/files/eiX07GHwKyf6IJPcnbH5" alt=""></div>

3. Click **Automatically managed** and enter the Liftoff Monetize parameters for automatic management from [Step 1](#step-1-locate-liftoff-monetize-parameters).
4. Auto-generate a Bidding network instance for each FairBid placement you want to mediate with Liftoff Monetize. For more information, see [Automatically Adding a Bidding Instance](/dt-console/app-management/setting-up-an-existing-app/setting-up-instances#automatically-adding-a-bidding-instance).

## Step 3: Add the Liftoff Monetize SDK to your Integration

To integrate the Liftoff Monetize/Vungle SDK, follow the instructions on the [Supported Networks](/dt-fairbid/fairbid-sdk/supported-networks) page.

## Step 4: Test Your Integration

Use the DT Test Suite to verify that you have set up your app properly for FairBid mediation. The DT Test Suite is available for Android, iOS, and Unity apps. For more information about using the DT Test Suite, see [Test Suite](/dt-fairbid/fairbid-sdk/tools/test-suite).

<div align="left" data-with-frame="true"><img src="/files/5139af76cb91452787becf8f79f9ac650890bc89" alt="" width="188"></div>




---

[Next Page](/llms-full.txt/1)

