mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[GH-ISSUE #17907] issue: API Key rejected for /api/v1/files/ upload despite correct config in v0.6.32 #33962
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sanctimon on GitHub (Sep 29, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17907
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.32
Ollama Version (if applicable)
No response
Operating System
Ubuntu 24.04
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
When sending a POST request to /api/v1/files/ with a valid API key in the Authorization: Bearer header, the server should accept the request and return a JSON response containing the uploaded file's metadata (e.g., file_id), as documented in the API Endpoints guide.
Actual Behavior
The server responds with:
{"detail":"Your session has expired or the token is invalid. Please sign in again."}This occurs even when:
The API key is freshly regenerated from the account settings
The correct headers are used (Authorization: Bearer, Accept: application/json)
The environment variables ENABLE_API_KEY_ENDPOINT_RESTRICTIONS=false and API_KEY_ALLOWED_PATHS=/api/v1/files/,/api/chat/completions,/api/models are set in the Docker Compose file
Steps to Reproduce
environment:
{"detail":"Your session has expired or the token is invalid. Please sign in again."}Logs & Screenshots
From container logs:
Additional Information
Open WebUI version: v0.6.32
Deployment method: Docker Compose
API key tested multiple times, freshly regenerated
JWT token also tested, returns 401 Unauthorized
Attempted /api/signin for session-based login, but endpoint returns Method Not Allowed
The issue persists despite the merged fix in PR #8131.
@tjbck commented on GitHub (Sep 30, 2025):
Unable to reproduce.