API Key issues #10585
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
It sounds to me like you may be confusing the purpose of the API key, but I can help clear things up for you quick. When setting Alternatively, these users can acquire an "API key". This is just another way for them to authenticate. It looks to me like you simply don't have the That being said, it feels like your "accessories" collection likely doesn't need authentication at all, and simply needs access control. This way you can control who can read, create, etc. based on user making the request. Here are the docs on that: https://payloadcms.com/docs/access-control/overview Hopefully this helps to clear things up. Otherwise I'm happy to continue elaborating on these concepts for you. |
Beta Was this translation helpful? Give feedback.
-
Thanks @jacobsfletch that explanation makes a lot of sense. I've been using Strapi tokens which i find quite useful . It seems payload will not let you authenticate without a user then:
|
Beta Was this translation helpful? Give feedback.
-
In the end i decided to use x-API-key withe the beforeRead hook. |
Beta Was this translation helpful? Give feedback.
In the end i decided to use x-API-key withe the beforeRead hook.