Authentication
ItsFriday uses API keys and OAuth 2.0 for authentication.API Keys
API keys are used for server-to-server communication.Creating an API Key
- Navigate to Settings > API Keys in the dashboard
- Click Create API Key
- Give it a name and select permissions
- Copy and store the key securely
Using API Keys
Include the API key in theAuthorization header:
Key Prefixes
| Prefix | Environment |
|---|---|
if_live_ | Production |
if_test_ | Test/Development |
Key Permissions
| Permission | Access |
|---|---|
read | Query data |
write | Send data |
admin | Manage settings |
OAuth 2.0 (Auth0)
For user authentication and the dashboard, we use Auth0.Configuration
Set these environment variables:Getting an Access Token
Using the Token
Multi-Tenant Access
Each request is scoped to the tenant associated with the API key or token. The tenant ID is extracted from:- API key association
org_idclaim in JWT tokenX-Tenant-IDheader (admin only)
Security Best Practices
Rotate keys regularly
Rotate keys regularly
Create new keys and deprecate old ones every 90 days.
Use separate keys per environment
Use separate keys per environment
Never use production keys in development.
Store keys securely
Store keys securely
Use environment variables or secret managers. Never commit keys to git.
Use minimum permissions
Use minimum permissions
Only grant permissions that are actually needed.
Troubleshooting
401 Unauthorized
401 Unauthorized
403 Forbidden
403 Forbidden
- The key doesn’t have required permissions
- Trying to access another tenant’s data
Token expired
Token expired
- OAuth tokens expire after 24 hours
- Request a new token using client credentials