Fictura
Apps & keys

SDK keys & config refresh

One key identifies your app; one config fetch decides what your app does. Both are designed so a bad network never breaks a launch.

The SDK app key

Format gk_ + 48 hex characters. It rides as x-api-key on every SDK call — config, events, errors, surveys, push registration — and on the server-side entitlements check. It identifies your app rather than authenticating a person: treat it like a publishable key, not a private one. The genuinely secret credentials are the Links API key (fk_live_…) and the data API keys on Setup → Keys & webhook (fk_data_…), which are shown once and stored hashed.

The config fetch

GET /api/v1/sdk/config returns everything server-driven in one payload: which tools are on, the live paywall and onboarding config for each placement, the disabled_events kill list, the web-checkout URL (or null, meaning show the store sheet), and a shadow entitlement verdict.

  • When it refreshes — at launch, on every foreground, every 45 seconds while the app is in the foreground, and it's re-checked on every logEvent. For that re-check, a fetched config is considered fresh for 5 minutes; a failed fetch retries after 10 seconds.
  • ETags — the SDK sends If-None-Match; a 304 costs almost nothing and counts as fresh.
  • Offline — the last good config is cached on device and rehydrated on cold start. Precedence is network → cache → the defaults you can bundle at build time.
  • Failure — fails open to the last known config. Your app never blocks on Fictura being reachable.

Why 'next config refresh' is the unit of change

Every dashboard action — flipping a tool, setting a paywall live, disabling an event, turning web checkout off — lands on devices at the next launch or foreground, or within about 45 seconds on an app that is open. No release, no review.

Locale changes

If you supply getLocale, a change in its value makes the cached config stale however fresh it is, so the next refresh or logEvent re-fetches it — a user who switches language mid-session gets re-served without a restart. Growth.setLocale(tag) (0.23) refetches straight away.

On this page