UPDATED: golang code to query GA data via the Google Core Reporting API using two-legged service account Google OAuth2 authentication

i’ve updated my example Golang code that authenticates with the Core Reporting API using service account OAuth2 (two-legged) authentication to use the newly updated golang.org/x/oauth2 library.

my previous post & full explanation of service account pre-reqs/setup:


full code:

have fun!

drop me a line or say hello on twitter if any questions.