B2H BaaS

API Keys

Authenticate your applications with API keys.

Generating Keys

  1. Go to your project's Settings
  2. Click Generate New Key
  3. Copy the key immediately (it's only shown once)

Using API Keys

Include the key in the Authorization header:

Authorization: Bearer baas_abc123...

Or as a query parameter:

GET /api/v1/projects/{projectId}/data/users?apiKey=baas_abc123...

Key Types

TypeUse CasePermissions
AnonClient-side appsLimited by security rules
ServiceServer-side appsFull access (bypasses rules)

Best Practices

  • Never expose service keys in client-side code
  • Use environment variables for keys
  • Rotate keys periodically
  • Revoke unused keys