Appearance
SDK Reference
The SDK is the API contract used to run published funnels: runtime identity, events, uploads, checkout, payments, and the related user/subscription operations needed by a funnel integration. Server-to-server product capabilities that do not serve funnel execution belong to the separate Integration API.
Base URL:
text
https://sdk-api.funnelsgrove.comGet SDK Keys
Open the funnelgrove dashboard, select your project, then open Project Settings. Copy the SDK publishable key for public API calls and the SDK secret key for private server-side calls.
The publishable key is safe to expose in browser or mobile app code. The secret key is not; store it only on your backend.
Key rotation behavior:
| Key | Used by | Rotation behavior |
|---|---|---|
| SDK publishable key | Public API | Old key keeps working for 30 days. |
| SDK secret key | Private SDK and Integration API | Old key stops working immediately. |
API Split
| API | Auth header | Use for |
|---|---|---|
| Public API | X-SDK-Publishable-Key | Funnel sessions, checkout, access checks, and App Login. |
| Private API | X-SDK-Secret-Key | Server-side subscription actions used by a funnel. |
| Integration API | Authorization: Bearer <SDK secret key> | Backend user reads, transaction search, email delivery, template authoring, and lifecycle sequences. |
Required IDs
Most funnel-runtime requests include funnelId. App access verification can instead resolve a user across the project through the SDK publishable key. Verified-email lookup returns the FunnelsGrove user_id; save that opaque ID on the authenticated account and use it for subsequent subscription checks and login tracking.
The reader-facing name is App Login. New integrations call verifyUserSubscription with a known userId or verified email, then call trackUserLogin only after OTP verification and active status. Verification is read-only; login tracking records App Login.