API Key header in Plugin Builder

Hi all,

I’m trying to build a plugin which consists of API calls. At present, I’m using “none or self-handled” for the authorization, and some shared headers, one of which contains an API key. The calls are working fine like this. It also runs fine without the API header, but with HTTP Basic Auth enabled, and the username/password fields filled in.

What I want to be able to do is either:

  • Replace the API header with a value taken from Bubble’s database, so that different users can use their own credentials.
  • Or even better would be to be able to access the username/password fields that appear when you use HTTP basic auth instead of self-handling it, once again, populating with values from Bubble’s database.

I assume that I need to put something in the shared tab in the plugin builder, perhaps in the HTML header section or the Additional keys section? I haven’t found anything in the docs or forum which explains (to me at least) how to do this.

I’d like it so that when I choose get data from an external API, the box which appears would have a field, which I could dynamically apply the key from the database to. Failing that, I’d like any other possible solution.

Any suggestions gratefully accepted.

Cheers, Andrew