<?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: Scope undefined in Docker container in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Scope-undefined-in-Docker-container/m-p/718377#M58688</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/475054"&gt;@PJAlberts&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Thank you for including all those details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am going to tag a few community members to see if anyone has an insight or tip for us. Or is you've managed to get moving forward, any details you can share is greatly appreciated.&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/152964"&gt;@nikodev&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/101258"&gt;@Teun&lt;/a&gt;&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/144301"&gt;@taran42&lt;/a&gt;, any experience using Docker containers + Python in the manner&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/475054"&gt;@PJAlberts&lt;/a&gt;&amp;nbsp;is describing?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Jaycee&lt;/P&gt;</description>
    <pubDate>Mon, 14 Nov 2022 21:36:10 GMT</pubDate>
    <dc:creator>Jaycee_Lewis</dc:creator>
    <dc:date>2022-11-14T21:36:10Z</dc:date>
    <item>
      <title>Scope undefined in Docker container</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Scope-undefined-in-Docker-container/m-p/716778#M58593</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm rather stuck with my integration which uses the &lt;EM&gt;&lt;STRONG&gt;Contacts Search &lt;FONT size="3"&gt;API (&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;FONT size="3"&gt;&lt;SPAN class=""&gt;/crm/v3/objects/contacts/search&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/EM&gt;.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The error message (correlationId removed):&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;{"status":"error","message":"This app hasn't been granted all required scopes to make this call. Read more about required scopes here: &lt;A href="https://developers.hubspot.com/scopes.&amp;quot;,&amp;quot;correlationId&amp;quot;:&amp;quot;---" target="_blank" rel="noopener"&gt;https://developers.hubspot.com/scopes.","correlationId": "---&lt;/A&gt;&amp;nbsp;---==","errors":[{"message":"One or more of the following scopes are required.","context":{"requiredScopes":["contacts"]}}],"links":{"scopes":"&lt;A href="https://developers.hubspot.com/scopes" target="_blank" rel="noopener"&gt;https://developers.hubspot.com/scopes&lt;/A&gt;"},"category":"MISSING_SCOPES"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Scopes given to private app as per documentation:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;crm.objects.contacts.read (required as per documentation)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;crm.objects.contacts.write&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;crm.schemas.contacts.read&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;crm.schemas.contacts.write&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Behaviour:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;When instantiating the Python Integration class from the Python shell (&lt;STRONG&gt;not&lt;/STRONG&gt; in a Docker container), the requests to the Contacts search endpoint works flawlessly and data is retrieved.&lt;/LI&gt;&lt;LI&gt;When running the same integration from within a Docker containe as a worker, the scoping error provided is displayed.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Debugging performed:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Added a breakpoint using ipdb where the environment variable for the Private App key is imported from the environment&lt;UL&gt;&lt;LI&gt;Result: Private App key successfully imported&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Added a breakpoint where my HubSpot_Client class is instantiated with the Private App key as a parameter&lt;UL&gt;&lt;LI&gt;Result: HubSpot_Client class instantiated with the correct HubSpot API Private App key&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Added a breakpoint in the function where the Private App key is added to the request header&lt;UL&gt;&lt;LI&gt;Result: Private App key successfully added to the request header&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Questions:&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Are any further permissions required to make requests from a certain environment, like a Docker container?&lt;/LI&gt;&lt;LI&gt;Could using the same key for testing in the Python shell and in a Docker container be causing the request to be rejected for some reason?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Thank you for your time!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Johann&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2022 08:50:46 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Scope-undefined-in-Docker-container/m-p/716778#M58593</guid>
      <dc:creator>PJAlberts</dc:creator>
      <dc:date>2022-11-10T08:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Scope undefined in Docker container</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Scope-undefined-in-Docker-container/m-p/718377#M58688</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/475054"&gt;@PJAlberts&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Thank you for including all those details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am going to tag a few community members to see if anyone has an insight or tip for us. Or is you've managed to get moving forward, any details you can share is greatly appreciated.&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/152964"&gt;@nikodev&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/101258"&gt;@Teun&lt;/a&gt;&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/144301"&gt;@taran42&lt;/a&gt;, any experience using Docker containers + Python in the manner&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/475054"&gt;@PJAlberts&lt;/a&gt;&amp;nbsp;is describing?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Jaycee&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2022 21:36:10 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Scope-undefined-in-Docker-container/m-p/718377#M58688</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2022-11-14T21:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: Scope undefined in Docker container</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Scope-undefined-in-Docker-container/m-p/718569#M58713</link>
      <description>&lt;P&gt;Hi all. This matter has been resolved now. It had nothing to do with the scopes but more to do with my sausage fingers. I managed to add an additional character to my API key when copy-pasting it, so the key was invalid. Thank you very much for looking into it!&lt;/P&gt;&lt;P&gt;Johann&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 10:28:59 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Scope-undefined-in-Docker-container/m-p/718569#M58713</guid>
      <dc:creator>PJAlberts</dc:creator>
      <dc:date>2022-11-15T10:28:59Z</dc:date>
    </item>
  </channel>
</rss>

