<?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: My third party service has Oath2 token Authentication in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/My-third-party-service-has-Oath2-token-Authentication/m-p/1206821#M84707</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/995505"&gt;@ASaliasi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just clarify, are you trying to create an app or a custom coded action block in a workflow?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If it's an app, you can do this by adding an authentication service in your code repo and let it handle auto-refresh of tokens.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it's a custom coded action in a workflow, you won't be able to do it. However, you can build a custom app action block, where you can handle this in your repo.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Oct 2025 07:45:57 GMT</pubDate>
    <dc:creator>suprdense</dc:creator>
    <dc:date>2025-10-01T07:45:57Z</dc:date>
    <item>
      <title>My third party service has Oath2 token Authentication</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/My-third-party-service-has-Oath2-token-Authentication/m-p/1205624#M84610</link>
      <description>&lt;P&gt;Hello everyone,&lt;BR /&gt;&lt;BR /&gt;I need to create a Custom Code project, to integrate with my third party app.&lt;BR /&gt;Basically, if I have a request, I want to be able to open a Ticket in Hubspot, and then reply to the Hubspot Ticket, and then the ticket changes status accordingly.&lt;BR /&gt;&lt;BR /&gt;However, my third party app uses Oauth2, and the token refreshesh every 2 hours.&lt;BR /&gt;How can I make refresh it automatiacally in my code as well?&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Ardit&lt;/P&gt;</description>
      <pubDate>Sat, 27 Sep 2025 13:21:53 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/My-third-party-service-has-Oath2-token-Authentication/m-p/1205624#M84610</guid>
      <dc:creator>ASaliasi</dc:creator>
      <dc:date>2025-09-27T13:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: My third party service has Oath2 token Authentication</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/My-third-party-service-has-Oath2-token-Authentication/m-p/1205921#M84621</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/995505"&gt;@ASaliasi&lt;/a&gt;&lt;/SPAN&gt; and welcome, we are so glad to have you here!&lt;BR /&gt;&lt;BR /&gt;Great question, thanks for asking the HubSpot Community!&lt;BR /&gt;&lt;BR /&gt;To start with, I'd like to share documentation on the topic:&lt;BR /&gt;&lt;BR /&gt;- &lt;A href="https://developers.hubspot.com/docs/api-reference/auth-oauth-v1/guide" target="_blank"&gt;Manage OAuth access tokens&lt;/A&gt;&lt;BR /&gt;- &lt;A href="https://developers.hubspot.com/docs/api-reference/auth-oauth-v1/tokens/post-oauth-v1-token" target="_blank"&gt;Refresh an access token&lt;/A&gt;&lt;BR /&gt;- &lt;A href="https://developers.hubspot.com/docs/api-reference/automation-actions-v4-v4/custom-code-actions" target="_blank"&gt;Workflows | Custom Code Actions&lt;/A&gt;&lt;BR /&gt;- &lt;A href="https://developers.hubspot.com/docs/apps/legacy-apps/authentication/oauth-quickstart-guide" target="_blank"&gt;Working with OAuth | OAuth Quickstart Guide&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, I'd love to put you in touch with our Top Experts: Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/388267"&gt;@skimura&lt;/a&gt;&lt;/SPAN&gt;, &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/601366"&gt;@sylvain_tirreau&lt;/a&gt;&lt;/SPAN&gt; and &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt; do you have suggestions to help &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/995505"&gt;@ASaliasi&lt;/a&gt;&lt;/SPAN&gt;, please?&lt;BR /&gt;&lt;BR /&gt;Have a lovely day and thanks so much!&lt;BR /&gt;Bérangère&lt;/P&gt;</description>
      <pubDate>Mon, 29 Sep 2025 08:56:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/My-third-party-service-has-Oath2-token-Authentication/m-p/1205921#M84621</guid>
      <dc:creator>BérangèreL</dc:creator>
      <dc:date>2025-09-29T08:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: My third party service has Oath2 token Authentication</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/My-third-party-service-has-Oath2-token-Authentication/m-p/1206487#M84675</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/995505"&gt;@ASaliasi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can create a server in the backend to create the access token, whenever you are trying to interect with HubSpot then you can call that service, which will create a new access token and then you can interact witht the HubSpot Ticket using the REST API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I hope this will help you out. Please mark it as &lt;/SPAN&gt;&lt;STRONG&gt;Solution Accepted and upvote&lt;/STRONG&gt;&lt;SPAN&gt; to help another Community member.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2025 13:56:32 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/My-third-party-service-has-Oath2-token-Authentication/m-p/1206487#M84675</guid>
      <dc:creator>GRajput</dc:creator>
      <dc:date>2025-09-30T13:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: My third party service has Oath2 token Authentication</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/My-third-party-service-has-Oath2-token-Authentication/m-p/1206800#M84702</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/995505"&gt;@ASaliasi&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;You don’t need to manually refresh the token every couple of hours. The simplest way is to set up a small service outside HubSpot that holds onto your access and refresh tokens securely. Whenever it’s about to call the third-party API, it checks if the token is close to expiring or if the API sends back a 401. If so, it uses the refresh token to grab a new access token and saves it.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;That way your HubSpot custom code just passes data along, and the service takes care of keeping tokens valid in the background. It avoids downtime and you never have to babysit the refresh yourself.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;If my post answered your question, please mark it as the accepted solution to support the community.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 01 Oct 2025 06:41:18 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/My-third-party-service-has-Oath2-token-Authentication/m-p/1206800#M84702</guid>
      <dc:creator>suprdense</dc:creator>
      <dc:date>2025-10-01T06:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: My third party service has Oath2 token Authentication</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/My-third-party-service-has-Oath2-token-Authentication/m-p/1206810#M84705</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/974506"&gt;@suprdense&lt;/a&gt;&amp;nbsp;, thank you for your reply!&amp;nbsp;&lt;BR /&gt;I was wondering if it can be done inside Hubspot Custom Code.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2025 07:24:07 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/My-third-party-service-has-Oath2-token-Authentication/m-p/1206810#M84705</guid>
      <dc:creator>ASaliasi</dc:creator>
      <dc:date>2025-10-01T07:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: My third party service has Oath2 token Authentication</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/My-third-party-service-has-Oath2-token-Authentication/m-p/1206819#M84706</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/346639"&gt;@GRajput&lt;/a&gt;&amp;nbsp;,thank you for your reply!&amp;nbsp;&lt;BR /&gt;I was wondering if it can be done inside Hubspot Custom Code.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2025 07:41:46 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/My-third-party-service-has-Oath2-token-Authentication/m-p/1206819#M84706</guid>
      <dc:creator>ASaliasi</dc:creator>
      <dc:date>2025-10-01T07:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: My third party service has Oath2 token Authentication</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/My-third-party-service-has-Oath2-token-Authentication/m-p/1206821#M84707</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/995505"&gt;@ASaliasi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just clarify, are you trying to create an app or a custom coded action block in a workflow?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If it's an app, you can do this by adding an authentication service in your code repo and let it handle auto-refresh of tokens.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it's a custom coded action in a workflow, you won't be able to do it. However, you can build a custom app action block, where you can handle this in your repo.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2025 07:45:57 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/My-third-party-service-has-Oath2-token-Authentication/m-p/1206821#M84707</guid>
      <dc:creator>suprdense</dc:creator>
      <dc:date>2025-10-01T07:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: My third party service has Oath2 token Authentication</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/My-third-party-service-has-Oath2-token-Authentication/m-p/1206822#M84708</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/974506"&gt;@suprdense&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;I should have clarified, a custom code within a workflow.&lt;BR /&gt;Got it, thank you for your reply.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2025 07:48:53 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/My-third-party-service-has-Oath2-token-Authentication/m-p/1206822#M84708</guid>
      <dc:creator>ASaliasi</dc:creator>
      <dc:date>2025-10-01T07:48:53Z</dc:date>
    </item>
  </channel>
</rss>

