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

查看:41
本文介绍了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/教程/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

这条消息毫无意义:我的帐户有谷歌分析数据,跟踪多个网站,我可以毫无问题地从网络浏览器访问它.我已通过 Google API 控制台允许 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.

通过查看API 访问"下方的内容,我获得了服务帐户的电子邮件地址(类似于 xxxxxx@developer.gserviceaccount.com).Google API 控制台中的标签.

I got the email address (something like xxxxxx@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.

祝你好运!

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

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