> ## 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 SDK with your API key at app startup.

## Overview

As soon as your app launches, configure the SDK with your **API Key**. This initializes the native Encore SDK on whichever platform the app is running on (iOS or Android).

***

## Initialize Encore in Your App

Call `configure` early in your app lifecycle — before identifying users or presenting offers. The recommended place is in `main()` or your root widget's `initState`:

```dart theme={null}
import 'package:flutter/material.dart';
import 'package:encore_flutter/encore_flutter.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await Encore.shared.configure(apiKey: 'pk_your_api_key_here');

  runApp(const MyApp());
}
```

Replace `pk_your_api_key_here` with your publishable **Live** key, which you retrieve yourself from the Dashboard under **Settings → Project API Keys** (use the **Test** key for staging and local development).

<Note>
  Can't find your API key? Open your project's **Settings → Project API Keys** in the [Encore Dashboard](https://dashboard.encorekit.com) and copy the **Live** key (or **Test** for non-production builds).
</Note>

***

## Enable Debug Logging

During development, enable debug logging to see SDK activity in your console:

```dart theme={null}
await Encore.shared.configure(
  apiKey: 'pk_your_api_key_here',
  logLevel: EncoreLogLevel.debug,
);
```

Set `logLevel` back to `EncoreLogLevel.none` (the default) before shipping to production.

***

## Next Steps

Now that Encore is configured, you're ready to:

* **[User Management](./user-management)** — Identify users for entitlement tracking
* **[Present Offers](./present-offers)** — Show promotional offers and handle purchase results
