<?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: Search  API v3 using Javajcript in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Search-API-v3-using-Javajcript/m-p/379965#M37352</link>
    <description>&lt;P&gt;Looking at var "response" you say URL:URL, BODY:BODY. That could be messing things up. If you named your variables differently the problem might go away. Another potential problem is that you are going to transmit a string and BODY is an array. Make it a string.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Oct 2020 20:19:35 GMT</pubDate>
    <dc:creator>malcolm1</dc:creator>
    <dc:date>2020-10-19T20:19:35Z</dc:date>
    <item>
      <title>Search  API v3 using Javajcript</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Search-API-v3-using-Javajcript/m-p/379246#M37278</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to get the contacts that is created base on the time filter.&lt;/P&gt;&lt;P&gt;Using Postman as a test, I was able to receive the expected response.&lt;/P&gt;&lt;P&gt;But upon creation using javascript, I receive this kind of error response.&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var headers = new Array();
    	headers['accept'] = '*/*';
    	headers['Content-Type'] = 'application/json';
    	var url = "https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey=hapikey"
    	var body = {
    		    "filterGroups":[
    		                    {
    		                      "filters": [
    		                        {
    		                          "propertyName": "createdate",
    		                           "operator": "GT",
    		                           "value": "1602123448000"
    		                        }
    		                      ] 
    		                    }
    		                  ]
    		                }
    	var response = https.post({
			url:url,
			headers:headers,
			body:body
		});&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;{
"status":"error",
"message":"Invalid input JSON on line 1, column 14: Unrecognized token 'filterGroups': was expecting 'null', 'true', 'false' or NaN",
"correlationId":"54873d32-5fb2-42ac-81e9-ff1ba7a69905"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't figure out on which part has problem.&lt;/P&gt;&lt;P&gt;Can someone help/teach me to correct this?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 06:33:14 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Search-API-v3-using-Javajcript/m-p/379246#M37278</guid>
      <dc:creator>jm_tangile</dc:creator>
      <dc:date>2020-10-16T06:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: Search  API v3 using Javajcript</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Search-API-v3-using-Javajcript/m-p/379896#M37336</link>
      <description>&lt;P&gt;hi &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/148450"&gt;@jm_tangile&lt;/a&gt; , are you still struggling with this?&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/11945"&gt;@lynton&lt;/a&gt; , &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/80052"&gt;@malcolm1&lt;/a&gt;&amp;nbsp; -- Do either of you have suggestions here?&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 15:53:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Search-API-v3-using-Javajcript/m-p/379896#M37336</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2020-10-19T15:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Search  API v3 using Javajcript</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Search-API-v3-using-Javajcript/m-p/379965#M37352</link>
      <description>&lt;P&gt;Looking at var "response" you say URL:URL, BODY:BODY. That could be messing things up. If you named your variables differently the problem might go away. Another potential problem is that you are going to transmit a string and BODY is an array. Make it a string.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 20:19:35 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Search-API-v3-using-Javajcript/m-p/379965#M37352</guid>
      <dc:creator>malcolm1</dc:creator>
      <dc:date>2020-10-19T20:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Search  API v3 using Javajcript</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Search-API-v3-using-Javajcript/m-p/379997#M37359</link>
      <description>&lt;P&gt;I'm already good with my issue. The problem was the body should be in string. Thanks guys!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 01:04:51 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Search-API-v3-using-Javajcript/m-p/379997#M37359</guid>
      <dc:creator>jm_tangile</dc:creator>
      <dc:date>2020-10-20T01:04:51Z</dc:date>
    </item>
  </channel>
</rss>

