Use Case

Screenshot pages behind a login

Capture screenshots of authenticated pages — dashboards, portals, reports, and compliance screens — without manual browser sessions. Automate login flows with API-driven steps and get reliable captures at scale.

How it works

Automate login, then capture

Most screenshot APIs can only capture public pages. ScreenshotCenter supports automation steps — a sequence of browser actions executed before the screenshot is taken. You instruct the browser to navigate to your login page, fill in credentials, submit the form, wait for the redirect, and then capture the authenticated page.

The automation runs inside a real Chromium browser, so it handles JavaScript-rendered login forms, client-side routing, and complex redirect chains — exactly as a human would.

  • Works with any username/password login form
  • Supports cookie injection for session-based auth
  • Handles JavaScript-rendered forms and SPA routing
  • Capture full page, visible area, or specific element
  • Output as PNG, JPEG, WebP, PDF, or video
POST /v1/screenshot
1

Navigate to login page

{"command": "navigate", "value": "https://app.example.com/login"}
2

Type email

{"command": "type", "element": "#email", "value": "[email protected]"}
3

Type password

{"command": "type", "element": "#password", "value": "your-password"}
4

Submit form

{"command": "click", "element": "#login-button"}
5

Wait for redirect

{"command": "sleep", "value": "3"}
6

Navigate to target

{"command": "navigate", "value": "https://app.example.com/dashboard"}
7

Take screenshot

{"command": "screenshot"}

Live Example

See it in action

The automation fills the login form, submits it, waits for the dashboard to load, then takes a screenshot — all driven by the steps parameter.

API Example

Login, navigate, and capture in one request

Pass an array of automation steps alongside the URL. The browser executes each step in order before the screenshot is taken. Use sleep steps to wait for JavaScript redirects, and navigate to jump to the protected page.

curl -X POST https://api.screenshotcenter.com/v1/screenshot \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://app.example.com/login",
    "steps": [
      {"command": "type",     "element": "#email",        "value": "[email protected]"},
      {"command": "type",     "element": "#password",     "value": "your-password"},
      {"command": "click",    "element": "#login-button"},
      {"command": "sleep",    "value": "3"},
      {"command": "navigate", "value": "https://app.example.com/dashboard"},
      {"command": "sleep",    "value": "2"},
      {"command": "screenshot"}
    ],
    "size": "page",
    "format": "png"
  }'

Need to skip the login form entirely? Use the cookies parameter to inject an existing session cookie instead.

Alternative: inject session cookies

If you already have a valid session token, skip the login steps entirely by injecting cookies directly. This is faster, avoids CAPTCHA issues, and works with SSO/OAuth flows.

curl -X POST https://api.screenshotcenter.com/v1/screenshot \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://app.example.com/dashboard",
    "cookies": [
      {
        "name": "session_token",
        "value": "eyJhbGciOiJIUzI1...",
        "domain": "app.example.com"
      }
    ],
    "size": "page"
  }'

Use Cases

What teams automate with authenticated screenshots

Authenticated page capture unlocks a new category of automation workflows — from compliance evidence to dashboard monitoring — that are impossible with public-only screenshot APIs.

📊

SaaS dashboard monitoring

Automatically capture authenticated dashboards — charts, usage metrics, and KPI tiles — without manually logging in each time. Send daily snapshots to Slack or Google Drive.

  • Analytics dashboards (Mixpanel, Amplitude, custom internal tools)
  • Billing summaries and subscription status pages
  • Admin consoles and health monitoring panels
📋

Client reporting and invoicing portals

Capture invoice pages, account statements, and client-facing reports as PDF or image evidence. Automate monthly report packaging without manual browser sessions.

  • Invoice and billing PDF generation from billing portals
  • Client portal snapshots for account managers
  • Automated PDF reports from SaaS back-offices
🛡️

Compliance and audit screenshots

Take timestamped screenshots of regulated authenticated pages — consent records, policy pages, and audit logs — for legal and compliance documentation workflows.

  • GDPR consent management dashboards
  • Audit log captures for SOC 2 evidence
  • Policy acceptance confirmation screens
🧪

CI and QA testing for authenticated routes

Run automated screenshot checks in CI against protected routes — user profiles, settings pages, and checkout flows — to catch rendering issues before they reach production.

  • User profile and account settings pages
  • Multi-step checkout and payment confirmation flows
  • Feature-flagged content visible only to logged-in users
🔍

Personalized and user-specific content capture

Capture pages that render differently per user — personalised homepages, recommendations, and account-specific pricing — to validate user segment logic.

  • A/B test variants visible only after login
  • Personalised product recommendations
  • Account-tier-specific feature visibility
📡

Internal tool documentation and change tracking

Document internal tools like CRMs, ERPs, and admin panels by capturing their current state on a schedule. Build visual changelogs for internal stakeholders.

  • Weekly screenshots of internal CRM views for ops teams
  • Admin panel snapshots before and after deployments
  • Automated visual changelogs for internal releases

Automation Commands

All commands available in automation steps

Combine any number of these commands to replicate the exact browser interactions your login flow requires.

CommandDescriptionExample value
typeType text into a form field"value": "[email protected]", "element": "#email"
clickClick a button or link"element": "#submit-btn"
navigateNavigate to a new URL"value": "https://app.example.com/dashboard"
sleepWait a number of seconds"value": "3"
javascriptExecute any JavaScript"value": "document.querySelector('#modal').remove()"
screenshotTake screenshot at this point(no value needed)

Security Best Practices

Handling credentials safely

Use service accounts

Create a dedicated read-only service account for screenshot automation. Never use personal credentials in API requests.

Inject session cookies

Prefer cookie injection over form-based login when your platform supports it. It avoids credential exposure in request payloads.

Use environment variables

Never hardcode credentials. Pass them at runtime via environment variables in your CI/CD pipeline or server-side code.

Rotate regularly

Rotate service account passwords and session tokens on a regular schedule and revoke any that are no longer needed.

Start capturing authenticated pages

Get 500 free captures to test your login flow. No credit card required. Full automation steps, cookie injection, and multi-format output included from day one.

Frequently asked questions

Is it safe to pass credentials to the API?

Credentials are transmitted over HTTPS and used only during the capture session. They are not stored or logged after the job completes. For additional security, use dedicated service accounts with read-only access rather than personal credentials.

Can I capture pages that use OAuth or SSO?

Yes. You can use automation steps to click through OAuth flows, fill in credentials on the identity provider's login page, and handle redirects before navigating to the target page. Cookie injection is also supported for session-based SSO.

What if the login page has a CAPTCHA?

For service accounts on your own platform, you can typically disable CAPTCHAs for trusted IPs or automated agents. Alternatively, pass an existing session cookie using the cookies parameter to skip the login form entirely.

Can I reuse a logged-in session across multiple captures?

Yes. Once you have the session cookies from a login flow, you can inject them directly into subsequent requests using the cookies parameter — skipping the login steps each time for faster, more efficient captures.

Does this work with multi-factor authentication (MFA)?

Direct TOTP/SMS MFA flows are difficult to automate. The recommended approach is to use service accounts with MFA disabled, inject session cookies from a pre-authenticated session, or use API tokens if your platform supports them.

Can I capture specific elements on the authenticated page?

Yes. After the login flow, use the target parameter with a CSS selector to capture a specific element — like a chart container or a data table — instead of the full page.