<?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: 403 attaching a file in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/403-attaching-a-file/m-p/830599#M66232</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074"&gt;@Jaycee_Lewis&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Is this enough for you? This is all that I see in the response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hs_error.jpg" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/96341iED79C296F2CCE331/image-size/large?v=v2&amp;amp;px=999" role="button" title="hs_error.jpg" alt="hs_error.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Aug 2023 10:30:00 GMT</pubDate>
    <dc:creator>psjavi</dc:creator>
    <dc:date>2023-08-07T10:30:00Z</dc:date>
    <item>
      <title>403 attaching a file</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/403-attaching-a-file/m-p/829804#M66195</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to attach a file using the php api integration:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;"hubspot/api-client"&lt;/SPAN&gt;: &lt;SPAN&gt;"^10.1.0"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;I've the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;$file &lt;/SPAN&gt;= &lt;SPAN&gt;new &lt;/SPAN&gt;&lt;SPAN&gt;\&lt;/SPAN&gt;SplFileObject&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$fileObj&lt;/SPAN&gt;-&amp;gt;&lt;SPAN&gt;getRealPath&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;;&lt;BR /&gt;&lt;SPAN&gt;$fileName &lt;/SPAN&gt;= &lt;SPAN&gt;$fileObj&lt;/SPAN&gt;-&amp;gt;&lt;SPAN&gt;getClientOriginalName&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;try &lt;/SPAN&gt;&lt;SPAN&gt;{&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;return &lt;/SPAN&gt;&lt;SPAN&gt;$this&lt;/SPAN&gt;-&amp;gt;&lt;SPAN&gt;client&lt;/SPAN&gt;-&amp;gt;&lt;SPAN&gt;files&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;-&amp;gt;&lt;SPAN&gt;filesApi&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;-&amp;gt;&lt;SPAN&gt;upload&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$file&lt;/SPAN&gt;, &lt;SPAN&gt;null&lt;/SPAN&gt;, &lt;SPAN&gt;"/"&lt;/SPAN&gt;, &lt;SPAN&gt;$fileName&lt;/SPAN&gt;, &lt;SPAN&gt;null&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;json_encode&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;"access" &lt;/SPAN&gt;=&amp;gt; &lt;SPAN&gt;"PRIVATE"&lt;/SPAN&gt;,&lt;BR /&gt;            &lt;SPAN&gt;"ttl" &lt;/SPAN&gt;=&amp;gt; &lt;SPAN&gt;"P2W"&lt;/SPAN&gt;,&lt;BR /&gt;            &lt;SPAN&gt;"overwrite" &lt;/SPAN&gt;=&amp;gt; &lt;SPAN&gt;false&lt;/SPAN&gt;,&lt;BR /&gt;            &lt;SPAN&gt;"duplicateValidationStrategy" &lt;/SPAN&gt;=&amp;gt; &lt;SPAN&gt;"NONE"&lt;/SPAN&gt;,&lt;BR /&gt;            &lt;SPAN&gt;"duplicateValidationScope" &lt;/SPAN&gt;=&amp;gt; &lt;SPAN&gt;"EXACT_FOLDER"&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;)&lt;/SPAN&gt;;&lt;BR /&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;catch &lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;ApiException &lt;SPAN&gt;$e&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;{&lt;BR /&gt;&lt;/SPAN&gt;    Log::&lt;SPAN&gt;channel&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'hubspot'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;-&amp;gt;&lt;SPAN&gt;error&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Error al subir archivo:' &lt;/SPAN&gt;. &lt;SPAN&gt;PHP_EOL &lt;/SPAN&gt;. &lt;SPAN&gt;$e&lt;/SPAN&gt;-&amp;gt;&lt;SPAN&gt;getMessage&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;, &lt;SPAN&gt;[&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;'response' &lt;/SPAN&gt;=&amp;gt; &lt;SPAN&gt;$e&lt;/SPAN&gt;-&amp;gt;&lt;SPAN&gt;getResponseBody&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;;&lt;BR /&gt;    &lt;SPAN&gt;return false&lt;/SPAN&gt;;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;I've the integration permission in alowing the file's handling but I'm getting the following error from&amp;nbsp;&lt;SPAN&gt;Cloudflare Ray / Hubapi.com:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="psjavi_0-1691155264320.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/96262i9C9B10332053F5D5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="psjavi_0-1691155264320.png" alt="psjavi_0-1691155264320.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My app integration permissions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="psjavi_1-1691156446339.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/96265iC3724B49063A408A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="psjavi_1-1691156446339.png" alt="psjavi_1-1691156446339.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 13:40:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/403-attaching-a-file/m-p/829804#M66195</guid>
      <dc:creator>psjavi</dc:creator>
      <dc:date>2023-08-04T13:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: 403 attaching a file</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/403-attaching-a-file/m-p/830003#M66209</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/174803"&gt;@psjavi&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; That looks like you triggered a block from Clodflare.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One question. At the bottom of the error screen, is there a Cloudflare Ray ID? If so, can you DM me the Ray ID and the Portal ID (HubID number) you used when getting this error, please?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks! — Jaycee&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 18:11:46 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/403-attaching-a-file/m-p/830003#M66209</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-08-04T18:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: 403 attaching a file</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/403-attaching-a-file/m-p/830599#M66232</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074"&gt;@Jaycee_Lewis&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Is this enough for you? This is all that I see in the response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hs_error.jpg" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/96341iED79C296F2CCE331/image-size/large?v=v2&amp;amp;px=999" role="button" title="hs_error.jpg" alt="hs_error.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 10:30:00 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/403-attaching-a-file/m-p/830599#M66232</guid>
      <dc:creator>psjavi</dc:creator>
      <dc:date>2023-08-07T10:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: 403 attaching a file</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/403-attaching-a-file/m-p/831656#M66287</link>
      <description>&lt;P&gt;Yes. I need you to copy and paste the Ray ID here. In this case, a screenshot won't be enough.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks! —Jaycee&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 22:22:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/403-attaching-a-file/m-p/831656#M66287</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-08-08T22:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: 403 attaching a file</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/403-attaching-a-file/m-p/831788#M66294</link>
      <description>&lt;P&gt;Hi, the Ray ID is:&amp;nbsp;&lt;SPAN&gt;7f2ecdb41eb52fa1&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 06:53:46 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/403-attaching-a-file/m-p/831788#M66294</guid>
      <dc:creator>psjavi</dc:creator>
      <dc:date>2023-08-09T06:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: 403 attaching a file</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/403-attaching-a-file/m-p/832442#M66341</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I have found the reason for the blockage, everything seems to point to the fact that your file storage provider is analysing the documents internally. I mean, the TXT file with which I am testing, has some internal notes with steps to follow to make some configurations in Amazon AWS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It must be analysing the content and it must be finding some instruction as malicious. On the other hand, if I convert the file to PDF, for example, the file uploads correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I try a TXT with a normal paragraph, it attaches it without problems.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the content of the TXT file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Crear el rol para la instancia y asignárselo a la instancia&lt;BR /&gt;&lt;BR /&gt;Instalar el cliente por shell&lt;BR /&gt;&lt;BR /&gt;dpkg --print-architecture&lt;BR /&gt;&lt;BR /&gt;coger la version de la arquitectura correspondiente&lt;BR /&gt;&lt;BR /&gt;wget https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/amd64/latest/amazon-cloudwatch-agent.deb&lt;BR /&gt;&lt;BR /&gt;sudo dpkg -i -E ./amazon-cloudwatch-agent.deb&lt;BR /&gt;&lt;BR /&gt;Pasos adicionales recomendados:&lt;BR /&gt;&lt;BR /&gt;sudo mkdir /usr/share/collectd&lt;BR /&gt;cd /usr/share/collectd&lt;BR /&gt;sudo touch types.db&lt;BR /&gt;&lt;BR /&gt;último paso de subir la config decir No&lt;BR /&gt;&lt;BR /&gt;Inicia el Cloudwatch Agent&lt;BR /&gt;sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -c file:/opt/aws/amazon-cloudwatch-agent/bin/config.json -s&lt;BR /&gt;&lt;BR /&gt;Revisa el estado del Servicio&lt;BR /&gt;sudo systemctl status amazon-cloudwatch-agent&lt;BR /&gt;&lt;BR /&gt;-----&lt;BR /&gt;&lt;BR /&gt;AccederLogsEC2&lt;BR /&gt;&lt;BR /&gt;https://docs.aws.amazon.com/es_es/AmazonCloudWatch/latest/monitoring/install-CloudWatch-Agent-commandline-fleet.html&lt;BR /&gt;&lt;BR /&gt;https://grafana.com/docs/grafana/latest/datasources/aws-cloudwatch/&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 08:46:13 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/403-attaching-a-file/m-p/832442#M66341</guid>
      <dc:creator>psjavi</dc:creator>
      <dc:date>2023-08-10T08:46:13Z</dc:date>
    </item>
  </channel>
</rss>

