<?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: Not authorized to access application in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Not-authorized-to-access-application/m-p/335897#M32664</link>
    <description>&lt;P&gt;Why would you need the API key of the Developer to create timeline events in the Target Portal? After all, you already have the user OAuth authorized, you have the refresh token. Why is the API key even necessary?&lt;/P&gt;</description>
    <pubDate>Thu, 30 Apr 2020 20:54:19 GMT</pubDate>
    <dc:creator>advance512</dc:creator>
    <dc:date>2020-04-30T20:54:19Z</dc:date>
    <item>
      <title>Not authorized to access application</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Not-authorized-to-access-application/m-p/304304#M28699</link>
      <description>&lt;P&gt;I built an application months ago that creates several custom Timeline Event Types and then a user of our app can create custom Timeline Events of those Types on a Contact.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far we've only used it with our own HubSpot Trial account but we are ready to publish it to the Marketplace.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We tested it in our own Test Account and everything worked fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My app uses OAuth to authenticate and has these scopes:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;contacts&lt;/LI&gt;&lt;LI&gt;timeline&lt;/LI&gt;&lt;LI&gt;oauth&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I'm not sure what changed or when, but now when I try to &lt;A href="https://developers.hubspot.com/docs/methods/timeline/get-event-types" target="_blank" rel="noopener"&gt;Get Timeline Event Types&amp;nbsp;&lt;/A&gt;using my OAuth-authenticated account (which is a Super User), I get this 403 Forbidden exception:&lt;/P&gt;&lt;PRE&gt;Account '6787334' is not authorized to access Application '205036'&lt;/PRE&gt;&lt;P&gt;But I used OAuth to permit Application 205036 in account 6787334 as shown in this screenshot:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.screencast.com/t/zaFLdiUeTAUl" target="_blank" rel="noopener"&gt;https://www.screencast.com/t/zaFLdiUeTAUl&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use the hapikey instead of the OAuth access token, it works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've never had to use the hapikey before, and understand that the&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/auth/oauth-overview" target="_blank" rel="noopener"&gt;use of API Keys is discouraged&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know why an OAuth access token would stop working for Timeline Event Type-related API calls?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 22:14:07 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Not-authorized-to-access-application/m-p/304304#M28699</guid>
      <dc:creator>mstralka</dc:creator>
      <dc:date>2019-11-26T22:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Not authorized to access application</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Not-authorized-to-access-application/m-p/304568#M28743</link>
      <description>&lt;P class="p1"&gt;Hi&amp;nbsp;,&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;When using this endpoint&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/timeline/get-event-types" target="_blank"&gt;&lt;SPAN class="s1"&gt;Get Timeline Event Types&lt;/SPAN&gt;&lt;/A&gt;, it is the intended and documented behavior that you should work only with a&amp;nbsp;&lt;STRONG&gt;developer hapikey&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;The reason it was working before which should not have been working, was an unintended behavior.&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;As timeline event is attached to a dev portal, we would need to use the&amp;nbsp;&lt;STRONG&gt;developer hapikey&lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;instead of OAuth authentication.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2019 06:56:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Not-authorized-to-access-application/m-p/304568#M28743</guid>
      <dc:creator>WendyGoh</dc:creator>
      <dc:date>2019-11-28T06:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Not authorized to access application</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Not-authorized-to-access-application/m-p/335897#M32664</link>
      <description>&lt;P&gt;Why would you need the API key of the Developer to create timeline events in the Target Portal? After all, you already have the user OAuth authorized, you have the refresh token. Why is the API key even necessary?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 20:54:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Not-authorized-to-access-application/m-p/335897#M32664</guid>
      <dc:creator>advance512</dc:creator>
      <dc:date>2020-04-30T20:54:19Z</dc:date>
    </item>
  </channel>
</rss>

