How to Create API-key Enabled Server Actions?

I appreciate your reply. You are seriously a rockstar!

That’s not quite what I want to do. I want to be able to make a REST call by passing data on the headers instead of two separate calls - one to authenticate and one for my API.

The article I referenced helped me figure it out but there wasn’t good Wappler documentation on how to get the HTTP header values.

Here’s what I ended up doing:

  1. Followed the steps in this article to set up a User table

  2. Created 2 new server variables
    image

  3. Added a condition to check for the presence of the header key and if it’s provided, login.
    image

  4. Then in postman provided the api-key and api-secret values

  5. If nothing is provided and the user’s not logged in:

2 Likes