<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Storing API Keys for a public app in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Storing-API-Keys-for-a-public-app/m-p/1182841#M83518</link>
    <description>&lt;P&gt;Thanks Brandon, I assumed it would need this - it's a shame as secure secrets for public apps exist on other platforms and I was hoping to utilise something like that to increase security in general. Thanks for the confirmation!&lt;/P&gt;</description>
    <pubDate>Wed, 30 Jul 2025 13:22:34 GMT</pubDate>
    <dc:creator>PaulBattisson</dc:creator>
    <dc:date>2025-07-30T13:22:34Z</dc:date>
    <item>
      <title>Storing API Keys for a public app</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Storing-API-Keys-for-a-public-app/m-p/1182786#M83513</link>
      <description>&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on a public app that acts as a bridge between HubSpot and a third-party API. This API requires some API keys from the user which ideally I want to store securely in HubSpot and pass through to my app if needed. I can see in private apps you can have secrets (&lt;A href="https://developers.hubspot.com/docs/reference/api/automation/custom-code-actions#secrets" target="_blank"&gt;https://developers.hubspot.com/docs/reference/api/automation/custom-code-actions#secrets&lt;/A&gt;). Is there a similar option for public apps?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any ideas or help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2025 11:59:41 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Storing-API-Keys-for-a-public-app/m-p/1182786#M83513</guid>
      <dc:creator>PaulBattisson</dc:creator>
      <dc:date>2025-07-30T11:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: Storing API Keys for a public app</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Storing-API-Keys-for-a-public-app/m-p/1182835#M83517</link>
      <description>&lt;P&gt;Hey Paul, Public apps don't support secrets. I suggest storing user keys externally in a secure store of some type:&lt;/P&gt;&lt;H4&gt;&amp;nbsp;&lt;/H4&gt;&lt;P&gt;&lt;STRONG&gt;1. Create a Secure BE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Stand up a secure backend or cloud function that:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Stores user-specific API keys securely (e.g., encrypted in a database)&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Maps each HubSpot account by portalId or userId&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Can proxy or inject the keys when calling the 3rd-party API&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. During app install, store the portalId&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When a user installs your app via OAuth, the &lt;STRONG&gt;access token response includes the portal ID&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;{&lt;/SPAN&gt; &lt;SPAN class=""&gt;"access_token"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"..."&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;"refresh_token"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"..."&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;"hub_id"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;123456&lt;/SPAN&gt; &lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;You can then use that hub_id to map user-specific credentials in your system.&lt;/P&gt;&lt;H4&gt;&amp;nbsp;&lt;/H4&gt;&lt;P&gt;&lt;STRONG&gt;3. Create a secure FE UI in your app&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Use a HubSpot app settings page or an embedded iframe (like a CRM card or settings tab) to allow users to &lt;STRONG&gt;enter their third-party API key&lt;/STRONG&gt; securely into your system.&lt;/P&gt;&lt;P&gt;You’ll:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Authenticate the user via OAuth token or signed request&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Store their API key server-side (encrypted)&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Retrieve the key &lt;STRONG&gt;only when needed&lt;/STRONG&gt;, server-to-server&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if this helps, or if you have any other questions!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;SPAN class="lia-unicode-emoji"&gt;&lt;SPAN class="lia-unicode-emoji"&gt;&lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Was I able to help answer your question? Help the community by&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;marking it as a solution.&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20.365535248041773%" height="191px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BrandonWoodruff_0-1753881196057.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/151986i4331C5E48FC05036/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BrandonWoodruff_0-1753881196057.jpeg" alt="BrandonWoodruff_0-1753881196057.jpeg" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD width="79.50391644908615%" height="191px"&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://www.linkedin.com/in/brandon-woody-woodruff/" target="_blank" rel="noopener nofollow noreferrer"&gt;Brandon Woodruff&lt;/A&gt;&lt;BR /&gt;&lt;/STRONG&gt;Senior Software Developer @&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.pearagon.com/" target="_blank" rel="nofollow noopener noreferrer"&gt;Pearagon&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Still have questions? Reach out at&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="mailto:brandon@pearagon.com" target="_blank" rel="noopener nofollow noreferrer"&gt;brandon@pearagon.com&lt;/A&gt;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BrandonWoodruff_1-1753881196058.png" style="width: 200px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/151985i2E2494A51D1F617A/image-size/small?v=v2&amp;amp;px=200" role="button" title="BrandonWoodruff_1-1753881196058.png" alt="BrandonWoodruff_1-1753881196058.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2025 13:13:27 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Storing-API-Keys-for-a-public-app/m-p/1182835#M83517</guid>
      <dc:creator>BrandonWoodruff</dc:creator>
      <dc:date>2025-07-30T13:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: Storing API Keys for a public app</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Storing-API-Keys-for-a-public-app/m-p/1182841#M83518</link>
      <description>&lt;P&gt;Thanks Brandon, I assumed it would need this - it's a shame as secure secrets for public apps exist on other platforms and I was hoping to utilise something like that to increase security in general. Thanks for the confirmation!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2025 13:22:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Storing-API-Keys-for-a-public-app/m-p/1182841#M83518</guid>
      <dc:creator>PaulBattisson</dc:creator>
      <dc:date>2025-07-30T13:22:34Z</dc:date>
    </item>
  </channel>
</rss>

