Error Reference

Every API error returns a JSON envelope with a machine-readable code, a human-readable message, and a link back to this page.

// Error response format
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable explanation",
"docs_url": "https://alkoholiks-api.vercel.app/docs/errors#ERROR_CODE"
}
}
UNAUTHORIZED401

The request is missing the Authorization header or it doesn't start with "Bearer ".

Missing or invalid Authorization header. Use: Bearer <access_token>
INVALID_TOKEN401

The access token is invalid, expired, or has been revoked.

Access token is invalid or expired. Request a new token via POST /oauth/token
INVALID_CLIENT401

The client_id or client_secret is wrong, or the consumer account has been deactivated.

Invalid client credentials
INVALID_REQUEST400

Required fields are missing from the token request (client_id, client_secret).

client_id and client_secret are required
UNSUPPORTED_GRANT_TYPE400

The grant_type is not "client_credentials". This is the only supported grant type.

Only client_credentials grant type is supported
RATE_LIMIT_EXCEEDED429

You've exceeded 100 requests per hour. Wait for the rate limit window to reset.

You have exceeded 100 requests per hour
VALIDATION_ERROR400

A required query parameter is missing or invalid (e.g., search without a "q" parameter).

Query parameter 'q' is required
INTERNAL_ERROR500

An unexpected server error occurred. If this persists, please report it.

An internal error occurred