#community-help

Problem with Typesense Scoped Key Generation

TLDR Sai faced an issue while creating a scoped key in Typesense. Jason clarified that node.js must be used to generate this key, rather than a browser.

Powered by Struct AI
3
2w
Solved
Join the chat
Sep 06, 2023 (2 weeks ago)
Sai
Photo of md5-9eeeed778bfab87dc0ae94a9f6c4a4f1
Sai
12:07 PM
while creating a scoped key let key = await typesense.keys().generateScopedSearchKey(keyWithSearchPermissions, { filter_by: "active:true" }) i am getting this error Error generating scoped search key: ReferenceError: Buffer is not defined
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
12:24 PM
You want to use node.js to generate scoped API keys. It does not work in the browser by design
Sai
Photo of md5-9eeeed778bfab87dc0ae94a9f6c4a4f1
Sai
01:36 PM
thank you