I added an apiUser collection to my app with the goal of setting up api-key authentication. I would like to test my setup in postman, at the url:
http://localhost:3000/api/accesswith api key authentication. Does anyone know how to implement
an authorization format like this:
${User.slug} API-Key ${YOUR_API_KEY}
, in postman?
If you ever run into this issue, the solution is to use as key "Authorization" and value "{your_collection.slug} API-Key {Your_API_Key}"🤩
For anyone else stumbling upon this thread, see
https://payloadcms.com/docs/authentication/overview#token-based-authand especially
https://payloadcms.com/docs/authentication/config#docunder the "Authenticating via API Key" heading
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.