Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
523 views
in Technique[技术] by (71.8m points)

error-handling - Analytics Google API错误403:“用户没有任何Google Analytics(分析)帐户”(Analytics Google API Error 403: “User does not have any Google Analytics Account”)

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

(我正在根据此页面上的Google Analytics(分析)分步指南创建脚本:)

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

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

Authorization is done without problems, until it tries to access data.

(完成授权没有问题,直到尝试访问数据为止。)

The return code is 403, and error message is:

(返回码是403,错误消息是:)

User does not have any Google Analytics account

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

This message has no sense: my account has google analytics data, tracking multiple websites, and I can access it from web browser without problem.

(此消息毫无意义:我的帐户具有Google Analytics(分析)数据,可跟踪多个网站,并且我可以从网络浏览器访问它而不会出现问题。)

I've allowed Analytics API through Google APIs console, and API access is giving me right data.

(我已经允许通过Google API控制台使用Google Analytics(分析)API,并且API访问为我提供了正确的数据。)

  ask by user989501 translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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 Analytics(分析)配置文件中来对其进行修复。)

I got the email address (something like [email protected]) for the service account by looking under the "API Access" tab in the Google APIs console.

(通过在Google API控制台的“ API访问”标签下查看,我获得了服务帐户的电子邮件地址(如[email protected])。)

Then, I followed Google's instructions for adding an email address to an Analytics profile .

(然后,我按照Google的说明将电子邮件地址添加到Google Analytics(分析)配置文件 。)

Now everything's working as expected.

(现在一切都按预期进行。)

Good luck!

(祝好运!)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...