I have problem with the emag marketplace api-3, when trying to read a product offer for id=33 product.
the filter is not working in the curl process.
here is my code:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://marketplace.emag.hu/api-3/product_offer/read?id=33');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_USERPWD, '[email protected]'.":".'pass');
curl_setopt($ch, CURLOPT_HTTPHEADER, array( "Authorization: Basic " . base64_encode('[email protected]'.":".'pass'),'Content-Type: application/json'));
$result = curl_exec($ch);
print($result);
what do you think, what is the solution for my problem?
the code will return all line, not specific to my 33 id product.
i try to change the get customrequest to post, with CURLOPT_POSTFIELDS
New contributor
mdean is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.