Skip to main content

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:

  1. Log in to your BoltShot dashboard
  2. Navigate to API Keys section
  3. Click Create API Key
  4. Give it a name (e.g., "Production API Key")
  5. Click Create
  6. 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​

  1. Never commit API keys to version control

    • Use environment variables
    • Use secret management services
    • Rotate keys regularly
  2. Set expiration dates

    • Regularly rotate API keys
    • Set reasonable expiration dates
    • Monitor key usage
  3. 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​