Не работает AOut2 аутентификация.

11 views
Skip to first unread message

2012 context

unread,
Aug 2, 2017, 1:18:16 AM8/2/17
to AdWords API Forum
$client = new Google_Client();

$client->setAssertionCredentials(new Google_Auth_AssertionCredentials(
SERVICE_EMAIL_MY, // $serviceAccountName
array('https://www.googleapis.com/auth/analytics.readonly'), //.readonly // scope
file_get_contents(KEY_FILE_MY) //privateKey
));

$client->setClientId(CLIENT_ID_MY);
$client->setAccessType('offline_access');
$client->setClassConfig("Google_Http_Request", "disable_gzip", true);

Работает со старым ключом p12 (достался по наследству), с новым нет, пишет:

2015-01-01Google error : - Error calling GET https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A73214144&start-date=2015-01-01&end-date=2017-07-20&metrics=ga%3Avisitors&dimensions=ga%3Adate: (403) User does not have any Google Analytics account. 

Peter Oliquino

unread,
Aug 2, 2017, 3:13:57 AM8/2/17
to AdWords API Forum
Hi,

My apologies as I can only provide support in English. As for your issue, our team supports AdWords API related concerns only and I'm afraid Google Analytics API concerns are already out of scope for us. Kindly contact the Analytics support team via this link for better assistance.

Best regards,
Peter
AdWords API Team
Reply all
Reply to author
Forward
0 new messages