Hi together,
we want to use Payloadcms as a headless cms for our 11ty based webpage. So before building the page, I need to get the posts from our cms.
As I don't want to perform a login every time, I want to use the useAPIKey functionality.
Imagine you have a collection "news" which is the one I want to get my page content from.
As the docs said, I added the following code block to my collection config
auth: {
useAPIKey: true,
},
https://payloadcms.com/docs/authentication/config#api-keys
But when I now refresh my page, I got also a field "E-Mail" and I need an API-Key per User.
Also when trying to use the generated key, I got the error "You are not allowed to perform this action."
Yes, added "Authorization" to my GET request header COLLECTION-SLUG API-Key KEYSTRING
Can you please help me?