<?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: Paragon and contacts scope in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Paragon-and-contacts-scope/m-p/682308#M56011</link>
    <description>&lt;P&gt;Hey Jaycee, thanks for replying! Turns out the issue was way easier than expected: the API was just lying straight to my face. The error message as you can see above explicitly states that the missing scope was "contacts". It was not: it was "crm.objects.deals.read". Extremely simple fix, but I believe that somewhere in the Hubspot code there might be an error and that very misleading message gets generated.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Aug 2022 19:39:29 GMT</pubDate>
    <dc:creator>LMenghini</dc:creator>
    <dc:date>2022-08-18T19:39:29Z</dc:date>
    <item>
      <title>Paragon and contacts scope</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Paragon-and-contacts-scope/m-p/681564#M55945</link>
      <description>&lt;P&gt;Hello everyone. I'm using Paragon to authenticate to Hubspot, and using their SDK to make my API calls. I'm trying to fetch the deals, but upon running the following code&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;const res = await paragon.request("hubspot", "/crm/v3/objects/deals", { 
  method: "GET"
});&lt;/LI-CODE&gt;&lt;P&gt;I get back the following error:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
...
"errors": [
	{
	"message": "One or more of the following scopes are required.",
	"context": {
		    "requiredScopes": ["contacts"]
		}
	}
],
...
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;But, I thought the contacts scope had been deprecated in favour of crm.objects.contacts.read and crm.objects.contacts.write (which I actually have).&lt;/P&gt;&lt;P&gt;What gives? There is some complications in that Paragon won't allow me to add the missing scope (as they have flagged it as deprecated or so it seems) so I'm trying to figure out what's wrong. Can anyone help?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 14:52:09 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Paragon-and-contacts-scope/m-p/681564#M55945</guid>
      <dc:creator>LMenghini</dc:creator>
      <dc:date>2022-08-17T14:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: Paragon and contacts scope</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Paragon-and-contacts-scope/m-p/682174#M56001</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/435516"&gt;@LMenghini&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Thanks for reaching out. It will be easier to split this out into two parts, I think.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Paragon questions —&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;To confirm, this is the product you are referring to, correct? &lt;A href="https://docs.useparagon.com/v/connect/resources/integrations/hubspot" target="_blank" rel="noopener"&gt;Paragon — HubSpot&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Looking at your code sample, it looks like you are calling the Deals API. Is that correct?&lt;/LI&gt;
&lt;LI&gt;If so, can you grab a screenshot of the scopes in your private app? Similar to this one&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="deal-scope.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/73111i57C2A2DF2F664C20/image-size/medium?v=v2&amp;amp;px=400" role="button" title="deal-scope.png" alt="deal-scope.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;HubSpot side:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Can you go here – &lt;A href="https://developers.hubspot.com/docs/api/crm/deals" target="_blank" rel="noopener"&gt;Deals API&amp;nbsp;&lt;/A&gt;&amp;gt; Get Deal by ID&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;LI-CODE lang="markup"&gt;GET /crm/v3/objects/deals/{dealId}​&lt;/LI-CODE&gt;
&lt;UL&gt;
&lt;LI&gt;You can use a private app with only the two granular scopes shown above, and it will work as expected from our end&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;My quick test&lt;BR /&gt;Request&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;curl --request GET \
  --url 'https://api.hubapi.com/crm/v3/objects/deals/9786091184?archived=false' \
  --header 'authorization: Bearer YOUR_ACCESS_TOKEN'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Response&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;HTTP 200

{
  "id": "9786091184",
  "properties": {
    "amount": null,
    "closedate": "2022-09-01T00:05:39.484Z",
    "createdate": "2022-08-11T00:05:47.455Z",
    "dealname": "Hire some cats",
    "dealstage": "appointmentscheduled",
    "hs_lastmodifieddate": "2022-08-12T19:16:15.308Z",
    "hs_object_id": "9786091184",
    "pipeline": "default"
  },
  "createdAt": "2022-08-11T00:05:47.455Z",
  "updatedAt": "2022-08-12T19:16:15.308Z",
  "archived": false
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It will not be possible to trouble shoot the Paragon side of things. Our best move is to verify the endpoint works while using the minimum required scopes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My suggestion is to verify you have the granular scopes for deals added. If the issue persists, I'd reach out to Paragon support and inquire why their app is attempting to use a depreciated scope instead of the granular scopes. Here's an article with more details —&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/api/oauth/contacts-scope-migration" target="_blank" rel="noopener"&gt;Contacts scope migration for app partners.&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/193060"&gt;@JBeatty&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/257487"&gt;@LMeert&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/166093"&gt;@miljkovicmisa&lt;/a&gt;&amp;nbsp;do you have any additional thoughts on troubleshooting here?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much! — Jaycee&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 15:51:23 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Paragon-and-contacts-scope/m-p/682174#M56001</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2022-08-18T15:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Paragon and contacts scope</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Paragon-and-contacts-scope/m-p/682308#M56011</link>
      <description>&lt;P&gt;Hey Jaycee, thanks for replying! Turns out the issue was way easier than expected: the API was just lying straight to my face. The error message as you can see above explicitly states that the missing scope was "contacts". It was not: it was "crm.objects.deals.read". Extremely simple fix, but I believe that somewhere in the Hubspot code there might be an error and that very misleading message gets generated.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 19:39:29 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Paragon-and-contacts-scope/m-p/682308#M56011</guid>
      <dc:creator>LMenghini</dc:creator>
      <dc:date>2022-08-18T19:39:29Z</dc:date>
    </item>
  </channel>
</rss>

