Errors
Unauthorized
401 - You are not authorized to access this resource
Overview
The 401 Unauthorized error occurs when the request lacks valid authentication credentials or the provided credentials are invalid.
HTTP Status Code
401
Error Response
{
"type": "https://scan-documents.com/docs/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"message": "You are not authorized to access this resource."
}Common Causes
- Missing API key in the request headers
- Invalid or expired API key
- Attempting to access a protected resource without authentication
- Malformed
Authorizationheader
How to Fix
- Include API Key: Ensure you include a valid API key in your request headers:
curl -X GET https://api.scan-documents.com/v1/files \
-H "Authorization: Bearer YOUR_API_KEY"-
Verify API Key: Check that your API key is correct and hasn't been revoked or expired. You can generate a new API key from your account dashboard.
-
Check Header Format: Ensure the
Authorizationheader follows the correct format:
Authorization: Bearer YOUR_API_KEYRelated Errors
- Not Found - Resource doesn't exist
- No Subscription - Active subscription required