Answer the question
In order to leave comments, you need to log in
How to connect Yandex.Market reviews on the site?
The Yandex API says that you need to get the authorization key and then insert it into the executable script. I got the script from there.
<?$url = "https://api.content.market.yandex.ru/v1/shop/{302413}/opinion.json";
$headers = array(
"Host: api.content.market.yandex.ru",
"Accept: */*",
"Authorization: {Ключ авторизации}" // ключ подставлю верно, проверил несколько раз
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$data = curl_exec($ch);
curl_close($ch);?>
Answer the question
In order to leave comments, you need to log in
I figured it out... you just need not to write { } these brackets when inserting the key and store ID.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question