Skip to Content
SPAPS is proprietary hosted SaaS. Paid access required; pre-1.0 contracts may change. Terms and access
PackagesIntegration Recipes

Integration Recipes

Browser Client

import { createBrowserClient } from 'spaps-sdk' const spaps = createBrowserClient(import.meta.env.VITE_SPAPS_PUBLISHABLE_KEY, { apiUrl: 'https://api.sweetpotato.dev' })

Register the exact browser origin on the staging application. A local frontend still calls the hosted API; for example, register http://localhost:5173 when that is your development origin.

Node Server

import { createServerClient } from 'spaps-sdk' const spaps = createServerClient(process.env.SPAPS_API_KEY!, { apiUrl: 'https://api.sweetpotato.dev' })

Python Server

import os from spaps_client import SpapsClient client = SpapsClient( base_url="https://api.sweetpotato.dev", api_key=os.environ["SPAPS_API_KEY"], )

Use staging credentials while developing and testing. Provision production credentials separately, then promote through environment configuration.

Next