Hey all, is anyone else having issues with local a...
# community-help
t
Hey all, is anyone else having issues with local authentication lately? All of the sudden, all of my requests fail with:
Copy code
RequestUnauthorized: Request failed with HTTP code 401 | Server said: Forbidden - a valid `x-typesense-api-key` header must be sent.
I’m confused, I’m on the latest stable docker image 0.25.1, and the latest version of the nodejs client 1.7.1. I’ve tried pruning my docker images and recreating my data volume. Nothing seems to help however. I’m setting the bootstrap api key via the TYPESENSE_API_KEY environment variable and just using that. Anyone else having this issue, or anyone got any tips for further troubleshooting?
k
Try checking the server logs to see if any error is logged when request fails
t
@Kishore Nallan - Okay, so I did that, and this is definitely the smoking gun there:
Copy code
Scoped API keys can only be used for searches.
However, I’m confused. I’m not manually creating API keys anywhere locally, and I’m just using the bootstrap API key, which I supply to the docker container as the TYPESENSE_API_KEY environment variable
Also, thank you for the quick and helpful response!
k
The code checks for bootstrap api key first and then checks for stored api keys and finally for scoped api key. So it seems like somehow you are passing the wrong key and it doesn't match bootstrap api key so it ends up in the code path that leads to this error.
t
@Kishore Nallan - Hrm. Okay, I was working on a demo reproduction and then my original codebase stopped having issues. I have no idea what happened there, but all I need is to be unjammed really, so I’m good again. Thank you for your help and sorry to spend your time on my confusion.
👍 1