Refreshing custom code secrets

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.

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 so the product team can publicly track your request.

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