Method 1: API Key (recommended)
Create an API key in Help Genie → Settings → API Keys → Create Key. The full key is shown once — copy it immediately and store it securely. Keys use thehg_live_ prefix.
Pass your key using either method:
- Don’t expire — work until revoked
- Rate limited: 60 requests/minute per key
- Max 5 active keys per user
- Keys carry the same permissions as the user who created them
Method 2: Session Token (for browser/app contexts)
For browser-based applications, authenticate with Supabase Auth:Authorization header:
Making authenticated requests
Authentication errors
| Error code | HTTP status | Description |
|---|---|---|
UNAUTHORIZED | 401 | No authentication header provided. |
INVALID_KEY_PREFIX | 401 | API key doesn’t start with hg_live_ or hg_admin_. |
KEY_NOT_FOUND | 401 | API key not found or has been revoked. |
INVALID_TOKEN | 401 | Session token is malformed, expired, or revoked. |

