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

# Configuration Reference

> Public configuration options for SDK, React, and web component integrations.

## Core SDK

```ts theme={null}
import initFanfare from "@fanfare-io/fanfare-sdk-core";

const sdk = await initFanfare({
  organizationId: "org_123",
  publishableKey: "pk_live_123",
});
```

| Option | Type | Purpose |
| - | - | - |
| `organizationId` | `string` | Your Fanfare organization ID. |
| `publishableKey` | `string` | Your browser-safe publishable key. |
| `credentials` | `RequestCredentials` | Controls browser credential behavior for SDK requests. |
| `auth.persistSession` | `boolean` | Controls local session persistence. |
| `auth.sessionDuration` | `number` | Session duration in seconds when applicable. |
| `sync` | `boolean` or configuration object | Enables or configures browser tab synchronization. |
| `features` | `object` | Advanced feature flags. Use only with guidance from Fanfare. |

The SDK default environment and API URL are the supported public integration path. Do not override them unless your Fanfare contact explicitly asks you to.

### Guided troubleshooting options

| Option | Purpose |
| - | - |
| `apiUrl` | Temporary API URL override when directed by Fanfare. |
| `debug` | Temporary SDK debug logging for development or guided troubleshooting. |

Only use guided troubleshooting options while investigating a specific issue.

## React provider

`FanfareProvider` accepts the core SDK configuration plus React-specific props.

| Prop | Purpose |
| - | - |
| `children` | React subtree that can use Fanfare hooks and components. |
| `autoRestore` | Restores local session on mount. Defaults to `true`. |
| `autoResume` | Resumes known journeys after restore. Defaults to `true`. |
| `loadingComponent` | React node shown while the SDK initializes. |
| `locale` | Locale for SDK component text. |
| `translations` | Partial translation overrides. |

## ExperienceWidget

| Prop | Purpose |
| - | - |
| `experienceId` | Required experience ID. |
| `autoStart` | Starts the journey on mount. |
| `accessCode` | Provides an access code when starting or rerouting. |
| `autoEnterWaitlist` | Enters waitlist automatically when available. |
| `theme` | Per-widget brand theme. |
| `variant` | `default`, `retro`, `rounded`, or `clean`. |
| `slots` | Targeted stage and phase overrides. |
| `children` | Full render prop override for the widget instance. |
| `checkoutUrl` | Default checkout destination for granted state. |
| `onJourneyChange` | Called when the raw journey snapshot changes. |
| `onGranted` | Called when a grant is available. |
| `onError` | Called when the widget reports an error. |
| `className` | Additional class for the React widget container. |

## Web component registration

| Option | Purpose |
| - | - |
| `organizationId` | Default organization ID for registered elements. |
| `publishableKey` | Default publishable key for registered elements. |
| `autoRestore` | Restores local session on mount. |
| `autoResume` | Resumes known journeys after restore. |
| `locale` | Default locale. |
| `translations` | Default translation overrides. |
| `themeConfig` | Default brand theme. |
| `variant` | Default widget variant. |
| `containerClass` | Default container class. |


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