Screenshot API error ยท HTTP 403

Referrer not allowed

referrer_not_allowed

The API key has a list of allowed websites (referrers), and the request came from a site that is not on it.

How to recognize it

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

HTTP/1.1 403
Content-Type: application/json

{
  "error": {
    "code": "referrer_not_allowed",
    "message": "You are not allowed to use this endpoint."
  },
  "message": "You are not allowed to use this endpoint."
}

Common causes

  • A call from a browser on a domain that is not in the key’s whitelist.
  • A new domain, subdomain or localhost during development.

How to fix it

  1. Add the domain to the key’s whitelist in the dashboard.
  2. Call the API from your server instead of the browser, so the key stays secret.

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