#community-help

Invalid API Key Error with Typesense Docker Image

TLDR 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.

Powered by Struct AI

1

3
6mo
Solved
Join the chat
Mar 31, 2023 (6 months ago)
Cooper
Photo of md5-b1f0bc2b9d796f6426c0fb73238b7a4d
Cooper
08:01 PM
Hey all, I am running the latest typesense docker image locally and am getting an invalid api key error when generating a scoped API key in my backend. I set the --api-key=xyz in the docker command (also tried --search-only-api-key=abcd in the docker command, but think that might be deprecated) but still getting this Forbidden - a valid x-typesense-api-keyerror in the frontend.

Am I able to use scoped API keys in the docker image? Thanks!
Apr 01, 2023 (6 months ago)
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
03:15 AM
Scoped API keys only work with parent keys that were generated via the /keys api endpoint and not the bootstrap key in the command line.
Apr 03, 2023 (6 months ago)
Cooper
Photo of md5-b1f0bc2b9d796f6426c0fb73238b7a4d
Cooper
03:13 PM
Great thank you!

1