Authentication

How Growise authenticates SDK traffic with project API keys, which environments to use, and how keys differ from end-user login.

Project API keys

Every SDK request is scoped to a project via an API key (gk_…). Create keys in the dashboard under Settings → Project / API Keys.

  • Web: pass key to growise.init(apiKey, options)
  • Android: GrowWiseConfig.Builder.setApiKey(...)
  • Flutter: GrowWise.initialize(apiKey: ...)
  • Never commit production keys into public repos — use env / secrets
  • Do not share real gk_… keys in chat, screenshots, or sample code

Environments (Web)

Pass env in init options. Use production credentials only in production builds. Never paste real API keys into docs, tickets, or public repos — store them in environment variables or a secrets manager.

  • local — local development (defaults when running on localhost)
  • dev / stag — sandbox environments provided in your Growise project settings
  • prod — production (api.thegrowise.com / events.thegrowise.com)
Web envjavascript
await growise.init(process.env.GROWISE_API_KEY, { env: 'prod' })

Project auth vs user identity

The API key authenticates your app to Growise. End-user identity is separate: call onUserLogin / identify / logIn after your own auth succeeds. Logging out the user does not rotate your API key.

Server-side

Backend track calls also use the project API key. Prefer server events for trusted commerce signals; keep the key only on the server.