Google Analytics(分析)Google API错误403:“用户没有任何Google Analytics(分析)帐户” [英] Analytics Google API Error 403: "User does not have any Google Analytics Account"

查看:183
本文介绍了Google Analytics(分析)Google API错误403:“用户没有任何Google Analytics(分析)帐户”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个基于Google Analytics(分析)分页指南的脚本:

I'm creating an script, based on Google Analytics step-by-step guide from this page:


https://developers.google.com/analytics/resources/tutorials/hello-analytics-api

授权完成没有问题,直到它尝试访问数据。返回码为403,错误信息为:

Authorization is done without problems, until it tries to access data. The return code is 403, and error message is:


用户没有任何Google Analytics(分析)帐户

User does not have any Google Analytics account

此消息没有意义:我的帐户有谷歌分析数据,跟踪多个网站,我可以从Web浏览器访问没有问题。我通过Google API控制台允许Google Analytics(分析)API,API访问权限正在给我正确的数据。

This message has no sense: my account has google analytics data, tracking multiple websites, and I can access it from web browser without problem. I've allowed Analytics API through Google APIs console, and API access is giving me right data.

推荐答案

我也有这个问题。我通过将我的服务帐户的电子邮件地址添加到我想要访问的Google Analytics(分析)配置文件中来修正。

I had this problem too. I fixed it by adding the email address for my service account to the Google Analytics profile I wanted it to access.

通过查看Google API控制台中的API访问标签,我得到了服务帐户的电子邮件地址(例如1234567890@developer.gserviceaccount.com)。

I got the email address (something like 1234567890@developer.gserviceaccount.com) for the service account by looking under the "API Access" tab in the Google APIs console.

然后,我按照 Google有关将电子邮件地址添加到Google Analytics(分析)配置文件的说明。现在一切都按预期工作。

Then, I followed Google's instructions for adding an email address to an Analytics profile. Now everything's working as expected.

祝你好运!

这篇关于Google Analytics(分析)Google API错误403:“用户没有任何Google Analytics(分析)帐户”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆