Search code examples
google-cloud-platformgoogle-analytics-apigoogle-reporting-api

Google Analytics Reporting API service account issues


I've been trying to get data from GA using a service account, however, my issue is that it keeps saying;

Error: User does not have sufficient permissions for this profile.

I have enabled GA reporting API and given access to GA account using the email of the service account. In addition, it was granted "read and analyze" permissions on the account.

Tried this method on a personal account, and everything worked fine, however, when working on a client project, the issue comes back.

What could I be missing?


Solution

  • This was interesting to figure out.

    I've used Account ID against one Google Analytics Account and that worked.

    For the one I have been having an issue with, I needed to use the View ID.