title: 400 Parser error with Google API POST call
body: <p>I am trying to make POST call towards Search Console API. I got my example running under API Explorer, however when I try to make the same call from my meteor project, I am getting error: </p>
  
  <blockquote>
    <p>Object {error: Object} error: Object code: 400 errors: Array[1]
    message: "Parse Error"</p>
  </blockquote>
  
  <p>My code:</p>
  
  <pre><code>function fetchSEOForWebsite(website) {
  
      var call = 'webmasters/v3/sites/' + 'mdbootstrap.com' + '/searchAnalytics/query'
      var params = {
          "searchType": "web",
          "dimensions": [
              "query",
              "date",
              "page"
          ],
          "startDate": "2016-02-06",
          "endDate": "2016-02-08"
      }
  
  
      GoogleApi.post(call, {
          params: params
      }, function(error, answer) {
  
          console.log(answer);
  
      });
  }
  </code></pre>
  
  <p>From Chrome console I can see POST payload: </p>
  
  <blockquote>
    <p>searchType=web&amp;dimensions=query%2Cdate%2Cpage&amp;startDate=2016-02-06&amp;endDate=2016-02-08</p>
  </blockquote>
  
  <p>The same query works perfectly fine from API Explorer :</p>
  
  <pre><code>POST https://www.googleapis.com/webmasters/v3/sites/http%3A%2F%2Fmdbootstrap.com/searchAnalytics/query?key={YOUR_API_KEY}
  
  {
   "searchType": "web",
   "dimensions": [
    "query",
    "date",
    "page"
   ],
   "startDate": "2016-02-06",
   "endDate": "2016-02-08"
  }
  </code></pre>
  
  <p>What am I doing wrong? </p>
  
  <p>I am using Meteor Google Api 
  <a href="https://github.com/percolatestudio/meteor-google-api" rel="nofollow">https://github.com/percolatestudio/meteor-google-api</a></p>
  
  <p>UPDATE:
  I also checked paylod sent via API Explorer and it's different:</p>
  
  <blockquote>
    <p>{   "searchType": "web",   "dimensions":    ["query","date","page"<br>
    ],   "startDate": "2016-02-06",   "endDate": "2016-02-08" }</p>
  </blockquote>
  
  <p>So it looks like for some reason my params are not passed as a JSON object to call... </p>