Troubleshooting Local Authentication Issue in Typesense
TLDR Todd reported consistent issues with local authentication, leading to requests failing. Kishore Nallan suggested checking the server logs. This revealed Todd was using an incorrect API key. The issue resolved by itself, although somewhat mysteriously.
Oct 05, 2023 (1 month ago)
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?
Oct 06, 2023 (1 month ago)
Kishore Nallan12:06 AM
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
Kishore Nallan12:59 AM
Indexed 3011 threads (79% resolved)
Typesense Key and Data Problems After Server Restart
Masahiro experienced an issue with Typesense (Docker) on GCE, as the API key and data were lost after server restart. Kishore Nallan and Jason suggested that the issue might be with the Docker container or GCE instance not using a persistent volume, leading to data loss on restart.
Issues with Generating Scope API Keys in Python
Danny had issues generating a valid scope API key in a Python GraphQL server. Jason suggested encoding changes and confirmed that the key length varies. Issue unresolved with Python, although JS library worked.
Invalid API Key Error with Typesense Docker Image
Cooper faced an invalid API key error with the Typesense Docker image. Jason explained that scoped API keys only work with parent keys created via the /keys API endpoint.