> For the complete documentation index, see [llms.txt](https://docs.namiml.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.namiml.com/sdk-reference/nami/configure.md).

# configure

Initialize the client-side Nami SDK with your App Platform ID. Required for Nami to see paywalls and campaigns defined in the Nami Control Center.

Initialize the Nami SDK with configure. Pass in the [NamiConfiguration](/sdk-reference/nami/namiconfiguration.md) object to tailored the SDK for your purposes.<br>

{% tabs fullWidth="true" %}
{% tab title="Apple" %}
{% code fullWidth="true" %}

```swift
import NamiApple

var namiConfig = NamiConfiguration(appPlatformId: "APP_PLATFORM_ID")
namiConfig.logLevel = .warn

Nami.configure(with: namiConfig) { successOrFailure in

}
```

{% endcode %}
{% endtab %}

{% tab title="Android" %}

```kotlin
import android.content.Context
import com.namiml.Nami
import com.namiml.NamiConfiguration
import com.namiml.NamiLogLevel

Nami.configure(
    NamiConfiguration.build(
        context,
        "APP_PLATFORM_ID"
    ) {
        logLevel = NamiLogLevel.WARN
    }
) { configureResult, configureState ->


}
```

{% endtab %}

{% tab title="React Native" %}

```jsx
import { Nami } from 'react-native-nami-sdk';

let configDict = {
 'appPlatformID': 'APP_PLATFORM_ID',
 'logLevel': 'WARN',
};

await Nami.configure(configDict);
```

{% endtab %}

{% tab title="Roku" %}

```brightscript
m.namiManager = CreateObject("roSGNode", "namiSDK:Nami")
m.top.namiManager = m.namiManager

namiConfig = {
    appPlatformId   : "APP_PLATFORM_ID"
    logLevel        : "warn"
}

m.namiManager.callFunc("configure", namiConfig)
```

{% endtab %}

{% tab title="Flutter" %}

```dart
import 'package:nami_flutter/nami.dart';
import 'package:nami_flutter/nami_configuration.dart';
import 'package:nami_flutter/nami_log_level.dart';

var appleAppPlatformId = "YOUR_APPLE_APP_PLATFORM_ID";
var androidAppPlatformId = "YOUR_GOOGLE_OR_AMAZON_APP_PLATFORM_ID";

var namiConfiguration = NamiConfiguration(
    appPlatformIdApple: iosAppPlatformId,
    appPlatformIdGoogle: androidAppPlatformId,
    namiLogLevel: NamiLogLevel.debug);
Nami.configure(namiConfiguration);
```

{% endtab %}

{% tab title="Unity" %}

```cpp
using NamiSDK;

var appPlatformId = Application.platform == RuntimePlatform.Android ? "YOUR_GOOGLE_OR_AMAZON_APP_PLATFORM_ID" : "YOUR_APPLE_APP_PLATFORM_ID";

// if appPlatformId is null or omitted it will use the keys from settings
var configuration = new NamiConfiguration.Builder(appPlatformId) 
   .LogLevel(namiLogLevel.Debug) // if omitted, users Warn log level
   .NamiLanguageCode(NamiLanguageCode.FR) // if omitted, uses device language
  .Build();
Nami.Init(configuration);
```

{% endtab %}

{% tab title="Web" %}

```typescript
import { Nami, NamiConfiguration } from '@namiml/web-sdk';

const configDict: NamiConfiguration = {
 appPlatformId: "APP_PLATFORM_ID",
 logLevel: 'warn',
};

await Nami.configure(configDict);
```

{% endtab %}
{% endtabs %}
