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

Closed
opened 2026-02-22 18:24:35 -05:00 by yindo · 3 comments
Owner

Originally created by @aka-collab on GitHub (Aug 19, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2140

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

Originally created by @aka-collab on GitHub (Aug 19, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2140 ### 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](https://github.com/user-attachments/assets/acbadbf6-0458-4016-ab65-fac9264bdf98) ### Are there known steps to reproduce? _No response_
yindo added the possible bug label 2026-02-22 18:24:35 -05:00
yindo closed this issue 2026-02-22 18:24:35 -05:00
Author
Owner

@timothycarambat commented on GitHub (Aug 19, 2024):

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:

  • API key is wrong (or has spaces at the end?)
  • Wrong header when using Postman/code/POST
  • Did not put the key in the Authorization box at the top of the Swagger UI & save so you can use the swagger UI.
@timothycarambat commented on GitHub (Aug 19, 2024): 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: - API key is wrong (or has spaces at the end?) - Wrong header when using Postman/code/POST - Did not put the key in the `Authorization` box at the top of the Swagger UI & save so you **can use** the swagger UI.
Author
Owner

@aka-collab commented on GitHub (Aug 19, 2024):

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

@aka-collab commented on GitHub (Aug 19, 2024): 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](https://github.com/user-attachments/assets/126bf10c-f80a-4f51-bf87-cdcc88ecfb65)
Author
Owner

@timothycarambat commented on GitHub (Aug 20, 2024):

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

@timothycarambat commented on GitHub (Aug 20, 2024): Ah, good eye. Sorry i missed that, patched in 17abbe97e501937b36e3094bd860598adcd5e421
yindo changed title from [BUG]: update-pin API call returns "401 Error: Invalid auth token" even with valid API key to [GH-ISSUE #2140] [BUG]: update-pin API call returns "401 Error: Invalid auth token" even with valid API key 2026-06-05 14:40:31 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1395