> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encorekit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure the SDK

> Initialize the Encore Unity package with your API key when your game starts.

## Overview

Configure the package with your **API Key** when your game starts. This initializes the Encore SDK on the device: the native SDK on Android and iOS, and the web SDK on WebGL. A reward placement needs no purchase controller, so the API key is all it needs. A `ReduceChurn` placement whose offers sell a product also needs an `IEncorePurchaseController`, passed to `Configure`.

***

## Initialize Encore

Call `Encore.Configure` once, from the Unity main thread, before you identify the player or present anything. A `MonoBehaviour` in your first scene is a good place:

```csharp theme={null}
using EncoreKit;
using UnityEngine;

public class EncoreBootstrap : MonoBehaviour
{
    private void Awake()
    {
        Encore.Configure("pk_your_api_key_here");
    }
}
```

Replace `pk_your_api_key_here` with your publishable **Live** key from the Dashboard under **Settings → Project API Keys**. Use the **Test** key for development builds.

`Configure` throws `ArgumentException` when the key is null or empty. The full contract is on [`Configure()`](https://docs.encorekit.com/publishers/unity/sdk-reference/configure).

### Log level

Pass a `LogLevel` to see Encore's logs. The default is `LogLevel.None`:

```csharp theme={null}
Encore.Configure("pk_your_api_key_here", LogLevel.Debug);
```

The levels are `None`, `Error`, `Warn`, `Info`, and `Debug`. The package's own messages go to the Unity log, and the native SDKs' logs to Xcode or Android Studio. On WebGL they go to the browser console. Details: [`Configure()` notes](https://docs.encorekit.com/publishers/unity/sdk-reference/configure#notes).

***

## Threading

Call every `Encore` method from the Unity main thread. Every callback, `Task` continuation, and event the package raises also arrives on the main thread, so you can use Unity objects in them directly.

***

## Next steps

> [card] [User management](https://docs.encorekit.com/publishers/unity/quickstart/user-management.md)
>
> Identify the player and set attributes

> [card] [Present offers](https://docs.encorekit.com/publishers/unity/quickstart/present-offers.md)
>
> Show the reward sheet at a moment the player earned


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.