<?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: View full body of request in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/View-full-body-of-request/m-p/914305#M70710</link>
    <description>&lt;P&gt;Hi, &lt;SPAN style="color:var(--ck-color-mention-text);"&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/629825"&gt;@bgsueeid&lt;/a&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Great question. Outside the initial 2000 characters, you'll need to modify your code to log the request body to a file or a debugging tool just before it's sent.&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>Tue, 30 Jan 2024 21:10:23 GMT</pubDate>
    <dc:creator>Jaycee_Lewis</dc:creator>
    <dc:date>2024-01-30T21:10:23Z</dc:date>
    <item>
      <title>View full body of request</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/View-full-body-of-request/m-p/913172#M70653</link>
      <description>&lt;P&gt;Is it possible to view the full body of an previously made API request?&amp;nbsp; I sometimes receive an error message like the following: "Invalid input JSON on line 1, column 160983."&amp;nbsp; It would be helpful to see what the exact request body was so I can see what triggered the error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can view part of the body in the Call Details slideout from the logs of the private app that I'm calling.&amp;nbsp; However, only the first 2000 characters of the request body are shown, and clicking the Copy button only copies those 2000 characters to the clipboard.&amp;nbsp; If the problem is after the first 2000 characters, I can't identify the cause.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the PHP library to construct API calls, so I'm not building the request myself, which is why I'm seeking a way to view the raw request.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm fine with either calling an API function to get the full request body (perhaps using the Request ID) or using something within HubSpot itself; I'm just hoping that there's a way to get the full request to help with debugging.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 15:02:54 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/View-full-body-of-request/m-p/913172#M70653</guid>
      <dc:creator>bgsueeid</dc:creator>
      <dc:date>2024-01-29T15:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: View full body of request</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/View-full-body-of-request/m-p/914305#M70710</link>
      <description>&lt;P&gt;Hi, &lt;SPAN style="color:var(--ck-color-mention-text);"&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/629825"&gt;@bgsueeid&lt;/a&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Great question. Outside the initial 2000 characters, you'll need to modify your code to log the request body to a file or a debugging tool just before it's sent.&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>Tue, 30 Jan 2024 21:10:23 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/View-full-body-of-request/m-p/914305#M70710</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2024-01-30T21:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: View full body of request</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/View-full-body-of-request/m-p/914328#M70711</link>
      <description>&lt;P&gt;Hi, Jaycee.&amp;nbsp; Thank you for your response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to get the request body when using the PHP client library?&amp;nbsp; The library encapsulates details such as crafting the actual request body and I am not aware of a way to get the request body that will be generated before it is actually sent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance, if I want to create a contact, I would issue a command like the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;$apiResponse = $client-&amp;gt;crm()-&amp;gt;contacts()-&amp;gt;batchApi()-&amp;gt;create($batchInputSimplePublicObjectInputForCreate);&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The create() method returns the response from the server to the request.&amp;nbsp; But it doesn't appear that I have a way to get that request before it is sent, unless there is something akin to a "last request sent" global variable or property of the client.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 21:49:44 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/View-full-body-of-request/m-p/914328#M70711</guid>
      <dc:creator>bgsueeid</dc:creator>
      <dc:date>2024-01-30T21:49:44Z</dc:date>
    </item>
  </channel>
</rss>

