Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User does not have sufficient permissions for this profile #63

Open
enzedonline opened this issue Aug 16, 2021 · 2 comments
Open

User does not have sufficient permissions for this profile #63

enzedonline opened this issue Aug 16, 2021 · 2 comments

Comments

@enzedonline
Copy link

I've gone through all the setup instructions, and looked through previous Issues here but can't find any solution to getting this working. I'm wondering if there's been Google updates that have broken this? Initially I thought it might be because my Analytics property is GA4, so I created a 2nd one that's GA3/GA4, but the same issue persists.

Console errors:

Uncaught (in promise) 
{error: {…}}
error:
code: 403
errors: [{…}]
message: "User does not have sufficient permissions for this profile."

https://content.googleapis.com/analytics/v3/data/ga?start-date=2021-07-16&end-date=2021-08-15&ids=ga%3A_[propertyID]_&dimensions=ga%3Adate%2Cga%3AnthDay&metrics=ga%3Asessions&_src=embed-api%3Av1

Browsing to the above url (ID removed) gives the following output:

{
  "error": {
    "code": 401,
    "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
    "errors": [
      {
        "message": "Login Required.",
        "domain": "global",
        "reason": "required",
        "location": "Authorization",
        "locationType": "header"
      }
    ],
    "status": "UNAUTHENTICATED"
  }
}

It's not that useful a message in the end as any malformed or even missing data seems to produce the same error. The best I can take from that is that none of login credential info is getting through. The instructions for GA_KEY_FILEPATH are a little ambiguous (is this an OS path or partial URL?) - I tried both and also using the GA_KEY_CONTENT to make sure. Same result.

Steps I've followed (and re-followed from scratch to make sure I'm not doing something stupid):

  • Create new project in Cloud console.
  • Enable Analytics API
  • Create service account with Viewer role.
  • Create key.
  • Copy service account email address.
  • In Analytics console, add service account email address to property with Read & Analyse access.
  • Add relevant entries to local.py using property ID from property settings. I've tried with both GA_KEY_FILEPATH and GA_KEY_CONTENT.

From cloud console:
image

From analytics console:
image
image

@enzedonline
Copy link
Author

3rd time setting up Analytics property and cloud project from scratch, using non-g-suite affiliated google account this time, same result.

Shame, this looked like it would be a good tool.

@nvankampenhout
Copy link

I ran into this issue today. It works with UA properties but not with GA4 properties. GA4 properties don't have a View ID (the Property ID is not the same, using that leads to the 403 error). I think Wagalytics would need to be refactored to use the new Analytics Data API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants