# Refreshing custom code secrets

**URL:** <https://community.hubspot.com/t/refreshing-custom-code-secrets/50153>\
**Category:** Data Hub\
**Created:** [January 21, 2022, 1:44am UTC](https://community.hubspot.com/t/refreshing-custom-code-secrets/50153 "2022-01-21T01:44:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WaydeChristie1](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/waydechristie1/32/10224_2.png) [@WaydeChristie1](https://community.hubspot.com/u/WaydeChristie1)\
**Post date:** [January 21, 2022, 1:44am UTC](https://community.hubspot.com/t/refreshing-custom-code-secrets/50153/1 "2022-01-21T01:44:28Z")

</div>

Hi folks,

I’m using several **external APIs** in workflow custom code actions which require their API tokens to be regularly refreshed.

I could create a separate workflow to refresh these tokens on a regular basis, but I have no way of storing them anywhere in Hubspot. I also do not want to refresh the tokens every time my workflows run.

Ideally there would be a Hubspot API endpoint which would enable me to update our custom code secrets, but that doesn’t currently exist.

Any advice on where in Hubspot I could store external API tokens? Any other recommendations?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![jbogaert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jbogaert/32/33027_2.png) [@jbogaert](https://community.hubspot.com/u/jbogaert)\
**Post date:** [January 21, 2022, 3:57pm UTC](https://community.hubspot.com/t/refreshing-custom-code-secrets/50153/2 "2022-01-21T15:57:55Z")

</div>

Hi @WaydeChristie1!

Thanks for this question. I asked one of the members of our product team and I’m afraid they don’t really have a good solution for you. As you said, you can manually update secret values in the app, but there’s no way to programmatically update them, and they are not aware of any alternative solution inside of HubSpot itself.  
I do believe that this is worth bringing up. Feel free to add this idea to our **[ideas forum](https://community.hubspot.com/t5/Ideas/ct-p/ideas)** so the product team can publicly track your request.

---

<div class="post-metadata">

**Author:** ![WaydeChristie1](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/waydechristie1/32/10224_2.png) [@WaydeChristie1](https://community.hubspot.com/u/WaydeChristie1)\
**Post date:** [January 21, 2022, 10:59pm UTC](https://community.hubspot.com/t/refreshing-custom-code-secrets/50153/3 "2022-01-21T22:59:18Z")

</div>

Thanks jbogaert. Idea submitted: [https://community.hubspot.com/t5/HubSpot-Ideas/Refreshing-custom-code-secrets/idi-p/561010](https://community.hubspot.com/t5/HubSpot-Ideas/Refreshing-custom-code-secrets/idi-p/561010)
