Authentication
TikTok Miner uses API keys to authenticate requests. All API requests must include a valid API key in the request headers.Getting Your API Key
- Sign in to your TikTok Miner dashboard
- Navigate to Settings > API Keys
- Click Generate New API Key
- Copy your API key and store it securely
Making Authenticated Requests
Include your API key in theAuthorization header of every request:
- cURL
- TypeScript
- Python
API Key Types
Production Keys
Production API keys have full access to all features and are used for live applications.- Full rate limits apply
- Charges apply for API usage
- Suitable for production environments
Test Keys
Test API keys are used for development and testing:- Reduced rate limits
- Access to test data only
- No charges for usage
- Prefix:
test_
Environment Variables
Store your API keys in environment variables:.env
- TypeScript
- Python
Authentication Errors
Missing API Key
Invalid API Key
Expired API Key
Security Best Practices
Rotate Keys Regularly
Rotate Keys Regularly
Generate new API keys every 90 days and revoke old ones:
- Generate a new API key
- Update your applications to use the new key
- Monitor for any usage of the old key
- Revoke the old key after verification
Use Different Keys per Environment
Use Different Keys per Environment
Create separate API keys for:
- Development environment
- Staging environment
- Production environment
Monitor API Key Usage
Monitor API Key Usage
Track API key usage in your dashboard:
- Request count per key
- Last used timestamp
- Unusual activity patterns
- Geographic anomalies
Implement IP Whitelisting
Implement IP Whitelisting
Restrict API key usage to specific IP addresses:
- Go to Settings > API Keys
- Select your API key
- Add allowed IP addresses
- Save changes
OAuth Integration
For platform-specific data access (Instagram, TikTok, etc.), you may need OAuth tokens:Platform Authentication Flow
Storing Platform Tokens
Platform OAuth tokens are stored securely in thePlatformAuth table:
Next Steps
Creator Search
Start searching for creators
Profile Data
Fetch creator profiles