Google Analytics Management API error: User does n

2019-06-07 05:10发布

问题:

Sometimes when I try to link a filter to a profile view I get this error User does not have sufficient permissions for this filter. with status=403, code=OK, reason=insufficientPermissions.

I am using this scope https://www.googleapis.com/auth/analytics.edit and this error does not occur all the time but more or less randomly.

First I create a filter, and then I add it to an account, then I link the filter to a view from the same account.

Is it possible that the added filter is not processed at the moment I add it to a property? I cannot think of any another reason for this error. And it breaks the script :(

回答1:

Filters are not added to Properties, they are added to Accounts and linked to Views. Edit permission needs to be granted to your login for the specific Account you are working with or you will get the 403 error. Having Edit permission for the Property or View is not enough.