You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I was trying to implement tenant tokens using meilisearch. I followed the instructions from the document mentioned below:
Generating an API key using the master key
const client = new MeiliSearch({ host: 'http://localhost:7700', apiKey: '4Mkw9S_Yh-X5hTpSS9NLSO2emwKkAa-DZIbpYaV7Hzs' });
client.createKey({
uid: '5e2442b8-8cb8-4059-904d-dc2d13677c01',
name: 'Search API Key',
indexes: ['*'],
actions: ['search', 'indexes.get'], // I tried with * as well but it didn't work
expiresAt: null
});
Expected behavior
I should be able to get the data from the index using the token
Current behavior
I am getting the following error during search: Client side:
MeiliSearchApiError: The provided API key is invalid.
at /Users/prateek/work/emission_critical/repos/ec-services/node_modules/meilisearch/dist/bundles/meilisearch.cjs.js:186:17
at step (/Users/prateek/work/emission_critical/repos/ec-services/node_modules/meilisearch/dist/bundles/meilisearch.cjs.js:103:17)
at Object.next (/Users/prateek/work/emission_critical/repos/ec-services/node_modules/meilisearch/dist/bundles/meilisearch.cjs.js:84:51)
at fulfilled (/Users/prateek/work/emission_critical/repos/ec-services/node_modules/meilisearch/dist/bundles/meilisearch.cjs.js:74:54)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Meilisearch server side by enabling trace logs:
[2023-07-06T12:09: 18Z DEBUG actix_web:: middleware:: logger] Error in response: ResponseError { code: 403, message: "The provided API key is invalid.", error_code: "invalid_api_key", error_type: "auth", error_link: "https://docs.meilisearch.com/errors#invalid_api_key" }
[2023-07-06T12:09: 18Z INFO actix_web:: middleware:: logger] :: 1 "POST /indexes/{{index}}/search HTTP/1.1" 403 146 "-" "undici" 0.003958
Screenshots or Logs
None
Environment (please complete the following information):
OS: MacOS Ventura Version 13.4.1
Meilisearch version: Package version: "1.2.0"
meilisearch-js version: 0.33.0
Browser: NA
The text was updated successfully, but these errors were encountered:
First of all thank you for the library.
Description
I was trying to implement tenant tokens using meilisearch. I followed the instructions from the document mentioned below:
Expected behavior
I should be able to get the data from the index using the token
Current behavior
I am getting the following error during search:
Client side:
Meilisearch server side by enabling trace logs:
Screenshots or Logs
None
Environment (please complete the following information):
Package version: "1.2.0"
The text was updated successfully, but these errors were encountered: