API Authentication
All GigaReels API requests require authentication using API keys. This guide covers authentication methods, security best practices, and troubleshooting.Authentication Methods
Bearer Token
Standard HTTP Bearer authentication (recommended)
CLI Authentication
Automatic credential management for development
Bearer Token Authentication
Request Format
Include your API key in theAuthorization header:
SDK Implementation
The SDK handles authentication automatically:API Key Management
Getting Your API Key
- Log in to your GigaReels Dashboard
- Navigate to Settings β API Keys
- Click Generate New API Key
- Copy and securely store your API key
Key Properties
string
required
Your unique API key from the dashboard
string
Always starts with
giga_ followed by 32 alphanumeric charactersstring
Full access to all API endpoints and features
string
API keys do not expire but can be revoked from the dashboard
CLI Authentication
Login Process
1
Browser Authentication
CLI opens your browser to the GigaReels authentication page
2
Account Verification
Log in with your existing account or sign up for a new one
3
API Key Generation
System automatically generates an API key for CLI use
4
Local Storage
Credentials are stored in
~/.gigareels/credentials.jsonChecking Authentication Status
Logout
Authentication Errors
Common Error Responses
403 Forbidden
403 Forbidden
Cause: Valid API key but insufficient permissionsSolutions:
- Check your account subscription level
- Verify the endpoint requires the permissions you have
- Contact support if you believe this is an error
429 Too Many Requests
429 Too Many Requests
Cause: Rate limit exceededSolutions:
- Implement exponential backoff in your requests
- Check your rate limits in the dashboard
- Consider upgrading your plan for higher limits
Security Best Practices
API Key Security
π Storage
- Store in environment variables - Use secure secret management systems - Never commit to version control - Rotate keys regularly
π Network Security
- Always use HTTPS - Validate SSL certificates - Use proper CORS settings - Implement request timeouts
π¨ Monitoring
- Monitor for unusual usage patterns - Log authentication failures - Set up alerts for suspicious activity - Track API key usage in dashboard
π Rotation
- Rotate keys every 90 days - Generate new keys before travel - Revoke unused or compromised keys - Use separate keys per environment
Environment Variables
Set up secure environment variable management:- Development (.env)
- Production (Docker)
Request Security
Implement secure request patterns:Rate Limits
Default Limits
Rate Limit Headers
API responses include rate limit information:Handling Rate Limits
Testing Authentication
Test Script
CLI Testing
Migration Guide
From v1 to v2 Authentication
If youβre upgrading from an older version:- Old Format
- New Format
Credential Migration
Troubleshooting
API Key Not Working
API Key Not Working
- Verify the key format starts with
giga_ - Check for extra spaces or characters
- Ensure youβre using the correct environment
- Try generating a new API key
CLI Authentication Failed
CLI Authentication Failed
- Clear existing credentials:
npx @gigareels/sdk logout2. Try logging in again:npx @gigareels/sdk login3. Check your internet connection 4. Try using--localflag for development
Network Errors
Network Errors
- Verify you can reach
https://gigareels.com - Check firewall and proxy settings
- Ensure SSL certificates are valid
- Try a different network connection
Next Steps
1
Get Your API Key
Generate an API key from the GigaReels dashboard
2
Set Up Environment
Configure environment variables for secure key storage
3
Test Authentication
Verify your setup with a simple API call
4
Implement Security
Add proper error handling and security measures
Ready to Make API Calls?
Continue to the Render API Reference to start generating content.