Advanced · June 23, 2026 · 5 min

Using Custom Request Headers for Authenticated Screenshots

Some pages require specific headers to render properly, whether for authentication, A/B testing, or bypassing bot detection during legitimate automated testing.

Passing custom headers

The API supports forwarding custom headers with your request, allowing the target server to respond as if the request came from an authenticated session.

GET /api/screenshot?url=https://example.com&headers=Authorization:Bearer_TOKEN&key=YOUR_API_KEY

Security considerations

  • Never expose long-lived tokens in logs or shared dashboards
  • Rotate credentials used specifically for screenshot automation
  • Prefer short-lived tokens when possible

This feature unlocks screenshot automation for internal dashboards, staging environments, and gated content.

← Back to blog