401/screenshot, /animate
Unauthorized
How to fix the Scrnpix API 401 Unauthorized error when the provided API key is invalid, expired, or disabled.
When Does This Happen?
This error occurs when the X-KEY header contains an API key that does not exist, has been disabled, or does not match any active key in the system. The key is validated by comparing its SHA-256 hash against stored key hashes.
Reproduce This Error
curl -H "X-KEY: sk_invalid_key_here" \ "https://api.scrnpix.com/screenshot?url=https%3A%2F%2Fexample.com"
Unauthorized
How to Fix
- 1Verify your API key is correct — copy it directly from the dashboard
- 2Check that the key has not been disabled in the dashboard
- 3Generate a new API key if the current one is lost or compromised
- 4Ensure there are no extra whitespace characters around the key value
Correct Request
curl -H "X-KEY: sk_your_valid_api_key" \ "https://api.scrnpix.com/screenshot?url=https%3A%2F%2Fexample.com" \ --output screenshot.png
200 OK — returns the screenshot as a PNG image
Related Errors
Frequently Asked Questions
How can I tell if my API key has been disabled?
Log in to the Scrnpix dashboard and check the API Keys section. Each key shows its status (active or disabled). You can re-enable a disabled key from the same page.
Still Having Issues?
Check your API key and subscription status in the dashboard, or explore our language guides for integration examples.
Go to Dashboard