> ## 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 React Native SDK with your API key.

## Overview

As soon as your app launches, configure the SDK with your **API Key**. Retrieve your publishable **Live** key yourself from the Dashboard under **Settings → Project API Keys** (use the **Test** key for staging and local development).

***

## Option A: EncoreProvider (Recommended)

Wrap your app with `EncoreProvider` to automatically configure the SDK and register callbacks:

```tsx theme={null}
import { EncoreProvider } from '@tryencorekit/react-native';

export default function App() {
  return (
    <EncoreProvider apiKey="pk_your_api_key_here">
      <YourApp />
    </EncoreProvider>
  );
}
```

`EncoreProvider` calls `configure()` and `registerCallbacks()` automatically on mount.

***

## Option B: Manual Configuration

If you need more control, configure manually:

```tsx theme={null}
import Encore from '@tryencorekit/react-native';

// At app startup
await Encore.configure('pk_your_api_key_here');
await Encore.registerCallbacks();
```

<Warning>
  You must call `registerCallbacks()` after `configure()` to enable purchase and passthrough event handling.
</Warning>

***

## Configuration Options

```tsx theme={null}
await Encore.configure('pk_your_api_key_here', {
  logLevel: 'debug', // 'none' | 'error' | 'warn' | 'info' | 'debug'
});
```

| Option     | Type   | Default  | Description             |
| ---------- | ------ | -------- | ----------------------- |
| `logLevel` | string | `'none'` | Logging verbosity level |

<Tip>
  Use `logLevel: 'debug'` during development, then remove it for production builds.
</Tip>

<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>

***

## 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
