Skip to main content
Call configure() once, as early as possible in your application lifecycle, before any other SDK method. Only the API key is required:
Get your publishable Live key from the Dashboard under Settings → Project API Keys at dashboard.encorekit.com (use the Test key for staging and local development). It starts with pk_ and is safe to ship in client-side code.
The SDK is configure-once: only the first successful configure() call is honored; subsequent calls log a warning and are ignored. To change configuration, reload the page.

The options

Field-by-field contract: configure() reference. Two choices worth making up front:
  • User identity is not configured here. The SDK auto-generates an anonymous UUID and persists it in localStorage; attach your own stable id with identify() once you know it.
  • redemptionMode sets the app-wide default claim flow: 'deferred' (default; your code calls redeem() later) vs 'immediate' (one step). Placements can override it per surface. See Redemption Modes.

Full example

configure() returns true on success and false on invalid input (it logs the reason; it does not throw). Verify the live values at any time:

Supported Web Development Frameworks

The SDK works with every major web framework. Each guide shows where to call configure() and the full integration pattern, end to end:

React

EncoreProvider wraps your app; same options as configure(), passed as props

Vue

Call configure() in the root component’s onMounted hook

Svelte

Call configure() in the root component’s onMount hook

Angular

Wrap the SDK in a root-provided service that configures on construction

Vanilla JS

No bundler: load the UMD build from a script tag and use the EncoreSDK global

Next steps