API key authentication
All Snipp API endpoints require authentication. Include your API key in theapi-key header with every request.
Where to find your API key
- Sign in at snipp.gg.
- Go to Settings.
- Copy your API key from the API section.
Examples
API key permissions
Not all API keys have the same permissions. When you view your key in settings, you’ll see whether it has upload access enabled:| Permission | Description |
|---|---|
| Read | Fetch your profile, list uploads, browse discover. Always enabled. |
| Upload | Upload files and delete uploads. Can be toggled in settings. |
GET /users/@me and looking at the keyHasUploadsAccess field.
Security best practices
- Never expose your API key in client-side code, public repositories, or shared documents.
- Use environment variables in production (e.g.
process.env.SNIPP_API_KEY). - Rotate your key immediately if you suspect it has been compromised. You can regenerate it from your account settings.
- Limit upload access if your integration only needs read access.
Error responses
| Status | Cause |
|---|---|
401 | Missing api-key header |
401 | Invalid or expired API key |
403 | Account suspended or insufficient permissions |
error field describing the issue.
