title: How to get products list using curl request in magento 2.0
body: <p>I want to get all products using curl request. I had generated a access token via API integration from dashboard.</p>
  
  <p>Following is my code to get products list.</p>
  
  <pre><code>$token = 'xxxxxxxxxxxxxxxxxxxxxx';
  $url = 'http://myIP/Magento/index.php/rest/V1/products';
  $params = array('searchCriteria[filter_groups][0][filters][0][field]'=&gt;'page_size','searchCriteria[filter_groups][0][filters][0][value]'=&gt;10);
  $curl = curl_init($url);
  curl_setopt($curl, CURLOPT_POST, TRUE);
  curl_setopt($curl, CURLOPT_POSTFIELDS, $params);
  curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
  curl_setopt($curl, CURLOPT_HTTPHEADER, array('Authorization: Bearer '.$token));
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
  $res = curl_exec($curl);
  $response =  json_decode($res);
  print_r($response);
  </code></pre>
  
  <p>Response is</p>
  
  <pre><code>stdClass Object ( [message] =&gt; %fieldName is a required field. [parameters] =&gt; stdClass Object ( [fieldName] =&gt; product ) )
  </code></pre>
  
  <p>Please help. How do I get the products.</p>