Question: 401 Unauthorized error when downloading knowledge base documents from Dify chatbot embedded in iframe #32822
Replies: 1 comment 1 reply
-
|
This is a known issue. The root cause is that the document download endpoint ( Here are some things to try:
That said, even with these configurations, the fundamental issue is that the download endpoint requires console-level authentication which may not be fully compatible with public chatbot embeddings. This might require a feature request for a public-facing document download API. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
Content
Describe the issue
I have embedded the Dify chatbot iframe into my application system. When the chatbot lists the knowledge base documents in the conversation and I click on a file to download it in the chatbot dialog, the download fails.
The browser console shows the following error:
https://dify-server-address/console/api/datasets/7ae085bd-5839-4d97-8881-23e18532ffe9/documents/95e91f75-984c-455a-b9da-0185946db23e/download:1 Failed to load resource: the server responded with a status of 401 (UNAUTHORIZED)
And the browser also prompts: "The application system domain name refused our connection request."
Expected behavior
When clicking on a knowledge base document in the Dify chatbot embedded in iframe, the document should be downloaded successfully without 401 errors.
Steps to reproduce
Additional context
Beta Was this translation helpful? Give feedback.
All reactions