API Key Authentication
BrowserTest SDK uses API key authentication for all requests. You need a valid API key to use any SDK features.Getting Your API Key
- Visit BrowserTest Dashboard
- Sign up or log in to your account
- Navigate to the API Keys section
- Generate a new API key
Keep your API key secure! Never commit it to version control or share it publicly.
Initializing the SDK
Environment Variables
Always use environment variables for API keys:Configuration Options
Testing Authentication
Error Handling
The SDK throws specific errors for authentication issues:Rate Limits & Quotas
Each API key has associated quotas based on your plan:- Starter: 1,000 screenshots/month, 100 agentic tests/month
- Pro: 10,000 screenshots/month, 500 agentic tests/month
- Enterprise: Custom limits
Checking Usage
API Key Security Best Practices
- Never commit API keys to version control
- Use environment variables in production
- Rotate keys regularly for security
- Use different keys for different environments (dev/staging/prod)
- Monitor usage to detect unauthorized access
