Reputation: 2690
I have a simple need. Query the GA data of my company, wrangle then and seed them in a DB.
I wanted to write a python script to do so an and found out google Hello Analytics API: Python quickstart for service accounts.
I follow every step but the google console seems pretty confusing for me.
I ended up having a .json file as asked but I'm getting this error with google script : googleapiclient.errors.HttpError: <HttpError 403 when requesting https://www.googleapis.com/analytics/v3/management/accounts?alt=json returned "User does not have any Google Analytics account.">
Can someone lead me how to get the right authorization to make it work ?
EDIT : Just find out this tutorial... what's the differents between the 2 ?
Upvotes: 0
Views: 332
Reputation: 116869
User does not have any Google Analytics account.
Means that the user you are using the authenticate your application with does not have access to the google analytics account you are trying to request data from. Make sure that you are requesting a profile_id that the user has access to.
As you are using a service account i suspect that you forgot this step in the tutorial
You ned to give your service account access before its going to be able to access the data.
Upvotes: 1