Medium Feed

 

Saturday, April 11, 2015

Analytics Google API Error 403: “User does not have any Google Analytics Account”

I had faced the below ERROR while programmatically accessing Google Analytics data.

Error : Analytics Google API Error 403: “User does not have any Google Analytics Account”


Reason;  The O2Auth API service account has not had read permission for the Google analytics account which we trying to integrate.

Resolution:  When we create a  02Auth API service account , it will give as API P12 key file and a Email address like "xxxxxxxxx-ntormu3hduj9lmaxxxxxx@developer.gserviceaccount.com"

This email address should be provided with read permission in our google analytics account:

To provide read permission, follow the below step:

> Login Google Service account
> Go to Admin section
> Click on User management
> Add the O2auth Service account email address and proivde read permission


You are Done !!!

Now your Google analytics Api code will work and you could read the google analytics data.

No comments:

Post a Comment