Hi,
A while back I was granted access to the Deal API, and have been able to execute requests through the API explorer.
However, on my local machine I keep receiving an "HTTP Status 500 – Internal Server Error." I can get a token just fine and access other APIs such as the Browse API Search or GetItem Request, but not the Deal API.
My curl request looks like the following, once I receive the access token (I've blocked out the affiliate campaign and zip code with ****):
// Create curl resource $curl_deal = curl_init(); curl_setopt_array($curl_deal, array( CURLOPT_URL => "https://api.ebay.com/buy/deal/v1/deal_item?category_ids=111422", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array( "Authorization: Bearer " . $access_token, "X-EBAY-C-ENDUSERCTX: affiliateCampaignId=****, contextualLocation=country%3DUS%2Czip%3D****" ), )); $response_deal = curl_exec($curl_deal); $err_deal = curl_error($curl_deal); curl_close($curl_deal); if ($err_deal) { echo "cURL Error #:" . $err_deal; } else { echo $response_deal; } $json_deal = json_decode($response_deal, true);
Once again, this works with other APIs. Any ideas?
Thanks for your help!
David