I'm having trouble getting a Restful GET cURL to the Ebay API, the code I'm using is below, could someone tell me what I'm doing wrong. Since some of the XML API Calls are being deprecated, I'd like to just design my code now to use the new Restful API's.
$headers = array
(
'Authorization: Bearer '.$oAuth
);
$queryString = '?category_id=213';
$url = 'https://api.sandbox.ebay.com/commerce/taxonomy/v1/category_tree/64482/get_item_aspects_for_category';
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_URL, $url.$queryString);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 3);
$response = curl_exec($ch);
curl_close($ch);
print_r($response);
Any help with this would be greatly appreciated.
I'm not getting anything at all returned in the response, just an empty response. If I use the following:
$response = json_encode(curl_exec($ch));
Then I receive the word false and that's it. I don't receive any errors, error codes, nothing at all.
Update: I tried the debugging information in the comment link below and everything is blank, it doesn't write anything to the file. This curl request isn't sending anything at all back. There must be someone on here that use the eBay Restful API and can tell me what I'm doing wrong here.
Also, the response headers are only a empty value Status, no other return header information.