How to get a product from click bank API?

1.7k Views Asked by At

I am working in click bank API.In that API, I want to display product list for that API.I am beginner in click bank API.

For example

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://api.clickbank.com/rest/1.3/products/");
curl_setopt($ch, CURLOPT_HEADER, true); 
curl_setopt($ch, CURLOPT_HTTPGET, true); 
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/xml", "Authorization:DEV-DEVAPIKEY:API-CLERKAPIKEY"));
$result = curl_exec($ch);
curl_close($ch);

print $result;

How to solve it.Please advice me ASAP.

2

There are 2 best solutions below

0
On

I believe the products API is only for your products as a seller, and i don't think it will give you all the products on the marketplace (if that is what you are after). I ran into a similar problem, but in the past I found there is a way to download the entire marketplace in .zip format.

https://support.clickbank.com/hc/en-us/articles/220376547-Marketplace-Feed

9
On

try

curl_setopt($ch, CURLOPT_URL,"https://api.clickbank.com/rest/1.3/products/list");