infiniflow/ragflow · error · Exception
Invalid Basic Auth credentials
Error message
Invalid Basic Auth credentials
What it means
Error "Invalid Basic Auth credentials" thrown in infiniflow/ragflow.
Source
Thrown at api/apps/restful_apis/agent_api.py:2034
def _validate_token_auth(security_cfg):
"""Validate header-based token authentication."""
token_cfg = security_cfg.get("token", {})
header = token_cfg.get("token_header")
token_value = token_cfg.get("token_value")
provided = request.headers.get(header)
if provided != token_value:
raise Exception("Invalid token authentication")
def _validate_basic_auth(security_cfg):
"""Validate HTTP Basic Auth credentials."""
auth_cfg = security_cfg.get("basic_auth", {})
username = auth_cfg.get("username")
password = auth_cfg.get("password")
auth = request.authorization
if not auth or auth.username != username or auth.password != password:
raise Exception("Invalid Basic Auth credentials")
def _validate_jwt_auth(security_cfg):
"""Validate JWT token in Authorization header."""
jwt_cfg = security_cfg.get("jwt", {})
secret = jwt_cfg.get("secret")
if not secret:
raise Exception("JWT secret not configured")
auth_header = request.headers.get("Authorization", "")
if not auth_header.startswith("Bearer "):
raise Exception("Missing Bearer token")
token = auth_header[len("Bearer ") :].strip()
if not token:
raise Exception("Empty Bearer token")
alg = (jwt_cfg.get("algorithm") or "HS256").upper()
View on GitHub (pinned to 554fb1133a)
Solutions
- Send valid Basic Auth credentials matching the webhook configuration.
- Verify the username/password have not been rotated.
Example fix
import base64
headers = {'Authorization': 'Basic ' + base64.b64encode(b'user:pass').decode()} When it happens
Trigger: Thrown at api/apps/restful_apis/agent_api.py:2034 when the library encounters an invalid state.
Common situations: The webhook request presents incorrect Basic Auth credentials; updating the client credentials prevents this error.
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/ec93614ec22331fe.
Report an issue: GitHub.