Authentication
Learn how to authenticate your requests to the ScreenshotMAX API using your unique API access key. This guide covers the authentication process for both GET and POST requests, ensuring secure and efficient access to our services.
To use our API, you’ll need an access_key
. This key is unique to your account and is required for all API requests.
What is the Access Key?
The access_key
identifies and authenticates your requests. Think of it as your personal API password. Without it, the API will reject your requests.
How to use the Access Key
You can authenticate your requests in one of the following ways:
1. In the Header (Recommended)
Add the access key to the X-Access-Key
HTTP header. This method is secure and works with all HTTP methods.
2. In the Query String (GET requests only)
For GET requests, you can include the key as a query parameter:
This is useful for quick testing or browser-based usage.
3. In the JSON Body (POST requests only)
For POST requests, you can also include the key in the request body:
Example Requests
Example using curl (Header)
Example using fetch (POST)
Rotating Your Access Key
You can regenerate (rotate) your access key at any time from your dashboard. When you rotate your key:
- A new access key is generated immediately.
- Your old key becomes invalid and cannot be used anymore.
What happens if the access key is missing or invalid?
If your request doesn’t include a valid access_key
, you’ll receive a status 401 and a response like this:
This means your request was rejected due to authentication failure. Double-check your access key and try again.
Need help? Contact us at support@screenshotmax.com