# 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="../getting-started-with-dt-fairbid/setting-up-your-app-in-the-dt-console">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="../advanced-configurations/server-side-rewarding">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 %}
