Answer the question
In order to leave comments, you need to log in
YandexMarkertAPI: Problems with the token. How to fix?
I'm trying to connect a store to Ya.Market using the Yandex Market for Partner
library
. I'm trying to do:
use Yandex\Market\MarketClient;
//
$market = new MarketClient(ACCESS_TOKEN);
$market->setClientId(CLIENT_ID);
//логин, указанный при регистрации в партнерском интерфейсе
$market->setLogin(MARKET_LOGIN);
$campaigns = $market->getCampaigns();
/** @var \Yandex\Market\Campaign $campaign */
foreach($campaigns as $campaign){
print_r($campaign->toArray());
}
Fatal error: Uncaught exception 'Yandex\Common\Exception\ForbiddenException' with message 'Token is invalid' in phar:///home/yandex-php-library_master.phar/src/Yandex/Market/MarketClient.php:206
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question