<?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: Intermittent error: &amp;quot;Invalid JSON input: a request body was expected, but none found&amp;quot; in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Intermittent-error-quot-Invalid-JSON-input-a-request-body-was/m-p/1125086#M81039</link>
    <description>&lt;P&gt;That's very odd.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My next step would be switching out the hubpot endpoint with a webhook address that I control to verify that data is actually being sent. Assuming the result SHOULD be the same, then it must be either something between your server/app and Hubspot/any endpoint (server firewall?).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are a few free sites (obviously remove your sensitive information) that you can use like webhook.site or webhook.cool or even Zapier/Workato.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Perhaps it's a specific record? Or maybe some data isn't being escaped properly? Or isn't being processed properly?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Mar 2025 16:45:34 GMT</pubDate>
    <dc:creator>MichaelMa</dc:creator>
    <dc:date>2025-03-20T16:45:34Z</dc:date>
    <item>
      <title>Intermittent error: "Invalid JSON input: a request body was expected, but none found"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Intermittent-error-quot-Invalid-JSON-input-a-request-body-was/m-p/1124533#M81001</link>
      <description>&lt;P&gt;Hey everyone! We seem to be getting an HTTP status code 400 from HubSpot every so often. The error will state, "&lt;SPAN&gt;Invalid JSON input: a request body was expected, but none found." However, we've checked everything, and we definitely are sending a request body when this happens; we've added logging to our calls just to double check, and it does look like we are sending a body, as well as a&amp;nbsp;&lt;EM&gt;Content-Type&lt;/EM&gt; and&amp;nbsp;&lt;EM&gt;Content-Length&lt;/EM&gt; header.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The error does not seem to be contained to any one endpoint. We've seen the error on:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P data-unlink="true"&gt;&lt;SPAN&gt;POST https://api.hubapi.com/crm/v3/objects/:customObjectId:/search&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;POST &lt;A href="https://api.hubapi.com/crm/v3/objects/contacts/batch/read" target="_blank" rel="noopener"&gt;https://api.hubapi.com/crm/v3/objects/contacts/batch/read&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;and&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;A href="https://api.hubapi.com/crm/v3/lists/:listId/memberships/add" target="_blank" rel="noopener"&gt;POST https://api.hubapi.com/crm/v3/lists/:listId/memberships/add&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;I logged the CF-Ray response header for one of the failing requests to the list membership add endpoint. It was&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;921ad2b04e4ffeff-PDX for the request on March 17, 2025 at 2:37 AM CDT. Please let me know if there's any more data I can give you guys.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 16:07:12 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Intermittent-error-quot-Invalid-JSON-input-a-request-body-was/m-p/1124533#M81001</guid>
      <dc:creator>arickp1</dc:creator>
      <dc:date>2025-03-19T16:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent error: "Invalid JSON input: a request body was expected, but none found"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Intermittent-error-quot-Invalid-JSON-input-a-request-body-was/m-p/1124640#M81013</link>
      <description>&lt;P&gt;Are you able to check the logs in Hubspot and see what payload they received? Usually for API request errors, Hubspot let's you see the entire request and response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 20:44:30 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Intermittent-error-quot-Invalid-JSON-input-a-request-body-was/m-p/1124640#M81013</guid>
      <dc:creator>MichaelMa</dc:creator>
      <dc:date>2025-03-19T20:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent error: "Invalid JSON input: a request body was expected, but none found"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Intermittent-error-quot-Invalid-JSON-input-a-request-body-was/m-p/1125076#M81038</link>
      <description>&lt;P&gt;Hey Michael! Yes, so I was able to see some of the logs for the HubSpot apps that are getting these errors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like, for the endpoint "&lt;SPAN&gt;crm/v3/objects/contacts/batch/read", the HubSpot logs are reporting, "No body was received for this request." However, my application logs indicate that I sent a request body with a&amp;nbsp;Content-Length of 3352. The request ID is af7e3842-0021-48e6-9563-b4128f2bb674 and account ID is&amp;nbsp;3299556. This happened on&amp;nbsp;March 20, 2025 10:43 AM EDT.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It's like something in the middle between me and the HS API is stripping out the body. I don't see anything unusual about the body, it's just me asking for the contact IDs that are associated with a couple of emails that I'm passing along.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 16:21:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Intermittent-error-quot-Invalid-JSON-input-a-request-body-was/m-p/1125076#M81038</guid>
      <dc:creator>arickp1</dc:creator>
      <dc:date>2025-03-20T16:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent error: "Invalid JSON input: a request body was expected, but none found"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Intermittent-error-quot-Invalid-JSON-input-a-request-body-was/m-p/1125086#M81039</link>
      <description>&lt;P&gt;That's very odd.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My next step would be switching out the hubpot endpoint with a webhook address that I control to verify that data is actually being sent. Assuming the result SHOULD be the same, then it must be either something between your server/app and Hubspot/any endpoint (server firewall?).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are a few free sites (obviously remove your sensitive information) that you can use like webhook.site or webhook.cool or even Zapier/Workato.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Perhaps it's a specific record? Or maybe some data isn't being escaped properly? Or isn't being processed properly?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 16:45:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Intermittent-error-quot-Invalid-JSON-input-a-request-body-was/m-p/1125086#M81039</guid>
      <dc:creator>MichaelMa</dc:creator>
      <dc:date>2025-03-20T16:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent error: "Invalid JSON input: a request body was expected, but none found"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Intermittent-error-quot-Invalid-JSON-input-a-request-body-was/m-p/1125171#M81047</link>
      <description>&lt;P&gt;Hi Michael, I will add some code to re-send the failing requests to webhook.cool so that we can further troubleshoot this issue.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 18:45:27 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Intermittent-error-quot-Invalid-JSON-input-a-request-body-was/m-p/1125171#M81047</guid>
      <dc:creator>arickp1</dc:creator>
      <dc:date>2025-03-20T18:45:27Z</dc:date>
    </item>
  </channel>
</rss>

