-
Notifications
You must be signed in to change notification settings - Fork 62
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
Authenticating with service account in Python3 #27
Comments
Thanks for the feedback, I'll have to revamp the service account authentication one of these days – many of the underlying libraries have changed since I wrote it, so it's not surprising that it doesn't work anymore. As for getting to your profile from your account, that's no different from any other account object: Review the documentation at https://github.com/debrouwere/google-analytics/wiki/Authentication and let me know if anything is unclear. |
Thanks for your reply. Your first suggestion seemed to do the trick for me. On Fri, Feb 12, 2016 at 3:30 AM, Stijn Debrouwere [email protected]
|
I am unable to get this to work. None of the steps by @dtgnn worked for me. |
I am trying to run queries on my google analytics project. I use python3 and I authenticate using the p12 key associate to my service account. I ran into few issues and I was hoping to get some feedback.
After reading the wiki, I installed pycrypto and attempted to authenticate with:
ga.authenticate(client_email=client_email, private_key=private_key)
private_key
I stumbled into an encoding problem:I solved it modifying this line to remove the
encode('utf-8)
call.And now I'm stuck.
ga.authenticate
returns agoogleanalytics.account
object, containing a single account, however I don't know how to get from there to the profile I need to run my queries. Any idea?The text was updated successfully, but these errors were encountered: