Hi,
I’m trying to create with the new API a simple call that returns some user information as shown in the official documentation here
My problem is the call CURL and do not know what I’m doing wrong, I create a php file with this code ( I have already got the access token after executing the authentication ):
<?php
$n_access_token = "xxxxxxxxxxxxxxxxx";
//prepare parameters
$url = 'https://api.envato.com/v1/market/private/user/account.json';
$headers = 'Authorization: Bearer '.$n_access_token;
//start
$ch = curl_init();
//settings
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_URL, $url);
//run
curl_exec($ch);
//close
curl_close($ch);
?>
The page shows me this:
{"error":"access_denied","error_description":"Bearer token not found"}
Please Help me