Google Analytics报告API - 权限不足403

时间:2020-12-17 15:15:16

I am trying to access data from google-analytics. I am following the guide and is able to gauthorize my user and get the code from oauth.

我正在尝试从google-analytics访问数据。我正在按照指南进行操作,并能够对我的用户进行监控,并从oauth获取代码。

When I try to access data from GA I only get 403 Insufficient Permission back. Do I somehow have to connect my project in Google API console to my analytics project? How would I do this? Or is there some other reason why I get 403 Insufficient Permission back?

当我尝试从GA访问数据时,我只获得403不足许可。我是否必须以某种方式将我在Google API控制台中的项目连接到我的分析项目?我该怎么办?或者还有其他原因导致我获得403不足许可吗?

I am doing this in Python with Django and I have Analytics API turned on i my API console!

我正在使用Django在Python中执行此操作,并且在我的API控制台上启用了Analytics API!

3 个解决方案

#1


9  

Had the same problem, but now is solved. Use View ID Not account ID, the 'View ID', can be found in the Admin->Profiles->Profile Settings tab

有同样的问题,但现在已经解决了。使用View ID Not account ID,可以在Admin-> Profiles-> Profile Settings选项卡中找到'View ID'

UPDATE now, if you have more a account , you must go: Admin -> Select account -> under View-> click on View Settings

现在更新,如果你有更多的帐户,你必须去:管理员 - >选择帐户 - >在查看 - >点击查看设置

#2


0  

I had the same problem; sounds as simple as adding the email concerned to the list of users having at least a read access to your google analytics account Some complete (but not up-to-date, rails code speaking) tutorial here

我有同样的问题;听起来就像将相关电子邮件添加到至少具有对谷歌分析帐户的读取权限的用户列表一样简单这里有一些完整的(但不是最新的,铁路代码说话)教程

Should we mentions the scopes too ? googleapis.com/auth/analytics and googleapis.com/auth/analytics.readonly I guess would be sufficient

我们还应该提到范围吗? googleapis.com/auth/analytics和googleapis.com/auth/analytics.readonly我想这就足够了

and yep, the above question (view id instead of account id, as usually used in the tracking) is something to set as explained.

是的,上面的问题(查看id而不是帐户ID,通常在跟踪中使用)是按照解释设置的。

With those 3 checks, you're about to make it work as expected

通过这3项检查,您将要按预期工作

#3


0  

You should use View ID Not account ID, the 'View ID', you can go:

你应该使用View ID Not account ID,'View ID',你可以去:

Admin -> Select Site -> Under "View" -> View Settings , if it doesn't works

管理员 - >选择网站 - >在“查看” - >查看设置下,如果它不起作用

you can go: Admin->Profiles->Profile Settings

你可以去:管理员 - >个人资料 - >个人资料设置

#1


9  

Had the same problem, but now is solved. Use View ID Not account ID, the 'View ID', can be found in the Admin->Profiles->Profile Settings tab

有同样的问题,但现在已经解决了。使用View ID Not account ID,可以在Admin-> Profiles-> Profile Settings选项卡中找到'View ID'

UPDATE now, if you have more a account , you must go: Admin -> Select account -> under View-> click on View Settings

现在更新,如果你有更多的帐户,你必须去:管理员 - >选择帐户 - >在查看 - >点击查看设置

#2


0  

I had the same problem; sounds as simple as adding the email concerned to the list of users having at least a read access to your google analytics account Some complete (but not up-to-date, rails code speaking) tutorial here

我有同样的问题;听起来就像将相关电子邮件添加到至少具有对谷歌分析帐户的读取权限的用户列表一样简单这里有一些完整的(但不是最新的,铁路代码说话)教程

Should we mentions the scopes too ? googleapis.com/auth/analytics and googleapis.com/auth/analytics.readonly I guess would be sufficient

我们还应该提到范围吗? googleapis.com/auth/analytics和googleapis.com/auth/analytics.readonly我想这就足够了

and yep, the above question (view id instead of account id, as usually used in the tracking) is something to set as explained.

是的,上面的问题(查看id而不是帐户ID,通常在跟踪中使用)是按照解释设置的。

With those 3 checks, you're about to make it work as expected

通过这3项检查,您将要按预期工作

#3


0  

You should use View ID Not account ID, the 'View ID', you can go:

你应该使用View ID Not account ID,'View ID',你可以去:

Admin -> Select Site -> Under "View" -> View Settings , if it doesn't works

管理员 - >选择网站 - >在“查看” - >查看设置下,如果它不起作用

you can go: Admin->Profiles->Profile Settings

你可以去:管理员 - >个人资料 - >个人资料设置