Skip to content

API Keys

Gro uses API keys for authentication. There are two types of keys for different use cases.

TypePurposeSafe to Expose?
SDKBrowser-based tracking SDKYes — scoped to tracking only
APIServer-to-server API callsNo — keep secret on your server

Used by the Gro JavaScript tracking SDK in your storefront. These keys can only submit tracking events and cannot access the backend API. It’s safe to include them in client-side code.

Used for server-to-server integrations. These keys can authenticate backend API requests and should be kept secret. Required for programmatic access to the Gro API.

gro_{mode}_{accountId}_{random}_{hmac}
  • Mode: test or live
  • Account ID: identifies which account the key belongs to
  • Random: unique random string
  • HMAC: signature for edge validation

Navigate to Settings → API Keys in the Gro dashboard to:

  • Generate new SDK or API keys
  • View existing keys (the full key is shown only once at creation)
  • Revoke keys that are no longer needed
  • Track key usage

Include in your tracking SDK initialisation:

gro.init('gro_live_acc123_xK9p2nZ4s_a7f3c2b')

Pass as a Bearer token in the Authorization header:

Terminal window
curl -H "Authorization: Bearer gro_live_acc123_xK9p2nZ4s_a7f3c2b" \
https://api.gro.xyz/api/...

For full API documentation, see the API Reference.