Код: Выделить всё
{
"error": "server_error",
"error_description": "server encountered an unexpected condition that prevented it from fulfilling the request"
}
Код: Выделить всё
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.sandbox.ebay.com/identity/v1/oauth2/token',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'grant_type=authorization_code&code=v%5E1.1%23i%5E1%23p%5E3%23f%5E0%23I%5E3%23r%5E1%23t%5EUl41XzM6RURBMkI0QkQ3RDZGNzVBNzY3RTRFQjUwODk3REE3QzVfMF8xI0VeMTI4NA%3D%3D&redirect_uri=Muhammad_Tayyab-Muhammad-OTIFTE-epcga',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/x-www-form-urlencoded',
'Authorization: Basic TXVoYW1tYWQtT1RJRlRFU1QtU0JYLWNhYzMyODgwMi02ODMwYjc1YzpTQlgtYWMzMjg4MDI1Yjk1LTdjOGQtNDgyMC1iMjQ1LTlmNWQ=',
'Cookie: dp1=bu1p/QEBfX0BAX19AQA**69fc443e^; ebay=%5Esbf%3D%23%5E'
),
));
$response = curl_exec($curl);
curl_close($curl);
https://developer.ebay.com/api-docs/sta ... code-grant -request.html
Я не знаю, что я здесь делаю не так. Я не могу найти официальную коллекцию почтальонов для API ebay.
Подробнее здесь: https://stackoverflow.com/questions/784 ... en-in-ebay