<@U01PL2YSG8L> curl -X POST "<https://ew5h2tr67liv...
# community-help
a
@Kishore Nallan curl -X POST "https://ew5h2tr67livkp41p-1.a1.typesense.net/keys" \ -H "X-TYPESENSE-API-KEY: YOUR_ADMIN_KEY" \ -H "Content-Type: application/json" \ -d '{ "description": "Analytics Events Key", "actions": ["analytics:create"], "collections": ["books_collection"] }' key is generated by this but still getting 401 Unauthorized when we trying to create event meanswhile from admin api key it works perfectly
h
Hi @Akash Kumar If your event type is
popular_queries
could you try adding the destination collection in the collection allow list in addition to the
books_collection
? You can try with a wider access control such as
Copy code
"actions": ["analytics:*"],
"collections": ["*"]
to see if that works and then fine grain it later.
a
thanks its work
f
Keep in mind, this still gives access to deleting, creating and generally modifying every part of analytics. You shouldn't expose this to users on the front end
👍 1