Authentication
BoltShot uses API Key Authentication for screenshot requests. API keys are the recommended method for authenticating your requests.
API Key Authentication
API keys are ideal for:
- Server-to-server communication
- Production applications
- Long-term integrations
- Automation tools (Zapier, n8n, Make)
Creating an API Key
API keys are created in your BoltShot dashboard:
- Log in to your BoltShot dashboard
- Navigate to API Keys section
- Click Create API Key
- Give it a name (e.g., "Production API Key")
- Click Create
- Important: Copy the API key - you'll need it for all requests!
Using API Key
The primary method is to pass the API key as a query parameter:
GET https://api.boltshot.dev/capture?url=https://example.com&apiKey=your_api_key_here
Alternative: Header Method
You can also pass the API key in the X-API-Key header:
GET https://api.boltshot.dev/capture?url=https://example.com
Headers:
X-API-Key: your_api_key_here
Both methods work identically. The query parameter method is recommended for simplicity.
Authentication Errors
401 Unauthorized
Missing API Key:
{
"success": false,
"error": {
"code": "API_KEY_REQUIRED",
"message": "API key required"
}
}
Invalid API Key:
{
"success": false,
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid API key"
}
}
Expired API Key:
{
"success": false,
"error": {
"code": "API_KEY_EXPIRED",
"message": "API key expired"
}
}
Solution:
- Verify your API key is correct
- Check if the key has expired
- Create a new API key if needed
Best Practices
Security
-
Never commit API keys to version control
- Use environment variables
- Use secret management services
- Rotate keys regularly
-
Set expiration dates
- Regularly rotate API keys
- Set reasonable expiration dates
- Monitor key usage
-
Use HTTPS only
- Always use HTTPS in production
- Never send API keys over HTTP
Example Usage
# Simple screenshot request with API key in query parameter
GET https://api.boltshot.dev/capture?url=https://example.com&apiKey=your_api_key_here
# With additional options
GET https://api.boltshot.dev/capture?url=https://example.com&format=png&fullPage=true&apiKey=your_api_key_here
Next Steps
- Learn about Screenshot API options and parameters
- Check out Integrations for automation tools
- Review Error Codes for troubleshooting