Authentication

Screenshotly uses API tokens for authentication. Each request to the API must include your token in the Authorization header.

Getting Your API Token

  1. Sign in to your Screenshotly Dashboard
  2. Navigate to the API Tokens page
  3. Click “Generate New Token”
  4. Give your token a descriptive name (e.g., “Development”, “Production”)
  5. Copy your token immediately - you won’t be able to see it again!

Using Your Token

Include your API token in the Authorization header with the Bearer scheme:

Authorization: Bearer YOUR_API_TOKEN

Example request:

curl -X POST https://api.screenshotly.app/screenshot \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com"
  }'

Token Security

Follow these best practices to keep your tokens secure:

  • Never share your API tokens or commit them to version control
  • Use different tokens for development and production environments
  • Set appropriate expiration dates for your tokens
  • Store tokens securely in environment variables
  • Revoke compromised tokens immediately through the dashboard

Rate Limits

Rate limits are applied per token and vary by plan:

Free

  • 500 requests per day
  • 2 concurrent requests
  • 10MB max file size

Pro

  • 5,000 requests per day
  • 5 concurrent requests
  • 20MB max file size

Rate Limit Headers

The API includes rate limit information in the response headers:

X-RateLimit-Limit: 500
X-RateLimit-Remaining: 495
X-RateLimit-Reset: 1635724800

Rate Limit Errors

When you exceed your rate limit, the API will return a 429 Too Many Requests response:

{
  "error": "Rate limit exceeded",
  "reset": 1635724800
}

Token Management

Manage your tokens through the dashboard:

  • Generate new tokens
  • View active tokens
  • Monitor token usage
  • Revoke tokens
  • Set expiration dates

Next Steps