Replies: 2 comments 1 reply
-
I found a similar unsolved discussion that might be helpful: This thread discusses issues related to accessing the Knowledge Base API, which may provide insights into your 401 Unauthorized error. |
Beta Was this translation helpful? Give feedback.
-
I would suggest you provide your request data(e.g Postman sample) that we can see more clearly what you encountered. Upon improving the KB API endpoints, I did not see any the view/write permission settings and I don't think that has any priority in the development roadmap. Please keep in mind that KB and Chatbot use different API keys and have different architect in terms of implementation and authentication. Our team has been successfully integrating with Dify backend service both in docker compose and standalone backend. |
Beta Was this translation helpful? Give feedback.
-
Self Checks
Content
Hello Dify Community,
I'm trying to use the Knowledge Base API in a local Dify environment (v1.1.3 deployed via Docker Compose)
but am consistently getting a 401 Unauthorized (Invalid token.) error and am stuck.
I strongly suspect the issue is related to API key permissions, and I'm hoping someone here can offer some guidance.
【Current Situation:】
【Core Question:】
For Dify v1.1.3 in a local deployment, is there a way to grant or verify permissions (read, write, etc.) for a Knowledge Base API key (dataset-... format) for a specific knowledge base (dataset)?
In the admin UI, I can only see the list of API keys with their creation/last used dates. I cannot find any options related to setting or viewing permissions for these keys. I suspect this lack of visible permission control might be the root cause of the 401 error.
Could anyone clarify how API key permissions are handled for knowledge bases in the local v1.1.3 environment? Is there a specific procedure to set/check them, or are they supposed to have full permissions by default?
Any help or pointers would be greatly appreciated!
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions