ScreenshotLensscreenshotlensdocs

Authentication

Authorize capture requests with API keys created in the dashboard.

Authorize a request

Pass the key as the api_key query parameter.

curl -G "https://api.screenshotlens.com/v1/screenshots" \
  --data-urlencode "url=https://example.com" \
  --data-urlencode "api_key=YOUR_API_KEY" \
  --data-urlencode "response_type=json"

A missing or invalid key returns 401 Unauthorized with an empty body.

Requests made from a signed-in dashboard session are authorized by the session cookie, so the Playground works without a key.

Manage keys

Create, rename, and revoke keys under API keys at app.screenshotlens.com. The dashboard calls these endpoints, which require a session rather than an API key:

MethodPathPurpose
GET/v1/api-keysList keys
POST/v1/api-keysCreate a key
PUT/v1/api-keys/{id}Rename a key
DELETE/v1/api-keys/{id}Revoke a key

Key hygiene

  • Use separate keys for production, staging, CI, and internal tools.
  • Rotate a key when ownership changes or when it may have been exposed.
  • Store production keys in server-side environment variables or a secret manager.
  • Never ship a production key in frontend code.

API Keys walks through creating and rotating keys in the dashboard.

On this page