Get envato private collection

I am trying to get my own private collection on Envato themeforest market using their new API… I keep getting “Not found: no such endpoint” error.

What am I doing wrong?

$url = “https://api.envato.com/v3/market/user/collection=8104310”;
$curl = curl_init($url);

$personal_token = “”;
$header = array();
$header = 'Authorization: Bearer '.$personal_token;
$header = ‘User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:41.0) Gecko/20100101 Firefox/41.0’;
$header = ‘timeout: 20’;
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER,$header);

$envatoRes = curl_exec($curl);
curl_close($curl);
$envatoRes = json_decode($envatoRes);
I couldn’t find the proper url anywhere.

Hello :slight_smile:

Try replacing
$url = “https://api.envato.com/v3/market/user/collection=8104310”;
with
$url = “https://api.envato.com/v3/market/user/collection?id=8104310";

1 Like