Screenshot API error ยท HTTP 401

Missing API key

missing_api_key

The request carried no API key. Every call to /v1/take needs one, in the apikey header or the apikey query parameter.

How to recognize it

The API answers with status 401 and a JSON body with the message and the error.code missing_api_key, for example:

HTTP/1.1 401
Content-Type: application/json

{
  "error": {
    "code": "missing_api_key",
    "message": "No API key found in request"
  },
  "message": "No API key found in request"
}

Common causes

  • The apikey header or query parameter is missing, or misspelled (api_key, apiKey).
  • An HTTP client or proxy that drops custom headers, or a redirect that loses them.
  • An environment variable with the key that is empty in this environment.

How to fix it

  1. Send the key as the apikey header: curl -H "apikey: YOUR-API-KEY" ..., or append &apikey=YOUR-API-KEY to the URL.
  2. Get a free key at app.screenshotbase.com: 300 screenshots a month, no credit card.
  3. The body’s actions.sign_up link leads to the sign-up.

Billing

Not billed: a request answered with this error does not count against your quota.

Every response carries an X-Request-Id header. If this page does not explain the error, write to support@screenshotbase.com with that id. All statuses: status codes.

Other API errors

Screenshot API

Take screenshots from your code

screenshotbase renders any website in a real browser and returns the image: full page or viewport, any device size, retina, from 100+ countries, with cookie banners and ads hidden.

/v1/take documentation Screenshot API All documentation

300 free screenshots every month. No credit card required.

GET https://api.screenshotbase.com/v1/take?url=https://example.com&full_page=true

# Response: the image (PNG, JPG, WebP or GIF)
curl -G "https://api.screenshotbase.com/v1/take" \
  --data-urlencode "url=https://example.com" \
  -d viewport_width=1280 -d viewport_height=800 \
  -d format=png \
  -H "apikey: YOUR-API-KEY" \
  -o screenshot.png

More free tools

Start using our Screenshot API for free today!

Get 300 requests / month for free