Mintplex-Labs / anything-llm

The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, and more.
https://anythingllm.com
MIT License
22.14k stars 2.25k forks source link

[BUG]: update-pin API call returns "401 Error: Invalid auth token" even with valid API key #2140

Closed aka-collab closed 3 weeks ago

aka-collab commented 3 weeks ago

How are you running AnythingLLM?

Docker (remote machine)

What happened?

In both my code implementation and the Swagger UI for using the API, the POST method update-pin always returns an invalid auth token error even when the token is valid, not updating the document pin status. I've made sure I was using the right workspace slug and document Json filename. The Swagger UI also shows the error code 401 as undocumented, if that means anything to the dev team: image

Are there known steps to reproduce?

No response

timothycarambat commented 3 weeks ago

You need to use Authorization: Bearer <KEY> for your Post request and the endpoint works so we are unable to replicate on latest

Possible issues are:

aka-collab commented 3 weeks ago

Figured it out, it was a documentation issue. The swagger docs are missing the 'v1' in the url only for the update-pin method: image

timothycarambat commented 3 weeks ago

Ah, good eye. Sorry i missed that, patched in 17abbe97e501937b36e3094bd860598adcd5e421