# How to implement dynamic secret key parameters in API connector

**URL:** <https://forum.bubble.io/t/how-to-implement-dynamic-secret-key-parameters-in-api-connector/184251>\
**Category:** APIs\
**Created:** [December 30, 2021, 9:34am UTC](https://forum.bubble.io/t/how-to-implement-dynamic-secret-key-parameters-in-api-connector/184251 "2021-12-30T09:34:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![wwweb2401](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/wwweb2401/32/79435_2.png) [@wwweb2401](https://forum.bubble.io/u/wwweb2401)\
**Post date:** [December 30, 2021, 9:34am UTC](https://forum.bubble.io/t/how-to-implement-dynamic-secret-key-parameters-in-api-connector/184251/1 "2021-12-30T09:34:26Z")

</div>

I am using the API connector when setting up my API. Authorization takes place with a secret key. But each user must provide their own private key. I store the secret key in the database, there are no problems with that.  
How do I make the secret key dynamic in the API connector?  
[http://joxi.ru/krDY1z7uGjPzZm](http://joxi.ru/krDY1z7uGjPzZm)

---

<div class="post-metadata">

**Author:** ![lottemint.md](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/lottemint.md/32/26549_2.png) [@lottemint.md](https://forum.bubble.io/u/lottemint.md)\
**Post date:** [January 5, 2022, 4:55pm UTC](https://forum.bubble.io/t/how-to-implement-dynamic-secret-key-parameters-in-api-connector/184251/2 "2022-01-05T16:55:16Z")

</div>

One of the ways is to create public API endpoints in the backend section. I mean, you create a workflow that makes an API call to the 3rd party with the private key that you store in the DB - and then returns data.

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/8/f/8f56ac9e3cb57ceefcbe46eb49ef61d4ec2380fe.png)

Then, you can trigger the created API workflows via the API connector.  
So, the created workflows make requests with the parameter set as a public one (which allows using it dynamically).

Of course, you may need to add a kind of validation to ensure that the right user triggers your public API endpoints. I mean, you will need to send some extra parameters via the API connector.  
But, the good thing is that the private keys won’t be exposed.

---

<div class="post-metadata">

**Author:** ![wwweb2401](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/wwweb2401/32/79435_2.png) [@wwweb2401](https://forum.bubble.io/u/wwweb2401)\
**Post date:** [January 5, 2022, 7:31pm UTC](https://forum.bubble.io/t/how-to-implement-dynamic-secret-key-parameters-in-api-connector/184251/3 "2022-01-05T19:31:16Z")

</div>

Not sure if I understood you correctly. But I’ll try anyway, hope it helps. Thank you.

---

<div class="post-metadata">

**Author:** ![holdup.design](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/holdup.design/32/111191_2.png) [@holdup.design](https://forum.bubble.io/u/holdup.design)\
**Post date:** [January 5, 2022, 10:52pm UTC](https://forum.bubble.io/t/how-to-implement-dynamic-secret-key-parameters-in-api-connector/184251/4 "2022-01-05T22:52:26Z")

</div>

@wwweb2401 another solution is to read the API Key from Url (using [bubble.io](http://bubble.io) “Get data from Url”), Example: [appname.bubbleapps.io/page1?token=A3BN58TH2](http://appname.bubbleapps.io/page1?token=A3BN58TH2)

---

<div class="post-metadata">

**Author:** ![wwweb2401](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/wwweb2401/32/79435_2.png) [@wwweb2401](https://forum.bubble.io/u/wwweb2401)\
**Post date:** [January 6, 2022, 6:46am UTC](https://forum.bubble.io/t/how-to-implement-dynamic-secret-key-parameters-in-api-connector/184251/5 "2022-01-06T06:46:03Z")

</div>

@holdup.design  
Unfortunately this option does not work. I am making an API call to an application that is not embedded in the bubble, so I am unable to configure “Get data from url”. Also, passing keys by URL is insecure.

---

<div class="post-metadata">

**Author:** ![lottemint.md](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/lottemint.md/32/26549_2.png) [@lottemint.md](https://forum.bubble.io/u/lottemint.md)\
**Post date:** [January 6, 2022, 1:58pm UTC](https://forum.bubble.io/t/how-to-implement-dynamic-secret-key-parameters-in-api-connector/184251/6 "2022-01-06T13:58:53Z")

</div>

Если чё, напишите в личку мне.

---

<div class="post-metadata">

**Author:** ![wwweb2401](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/wwweb2401/32/79435_2.png) [@wwweb2401](https://forum.bubble.io/u/wwweb2401)\
**Post date:** [January 6, 2022, 2:23pm UTC](https://forum.bubble.io/t/how-to-implement-dynamic-secret-key-parameters-in-api-connector/184251/7 "2022-01-06T14:23:59Z")

</div>

Ок. Спасибо
