Open GoogleCodeExporter opened 9 years ago
It looks like the right way to do this is using "JWTs"
(https://developers.google.com/accounts/docs/OAuth2ServiceAccount). It's
unclear whether or not this library actually has support for the JWT Server To
Server flow.
Original comment by stevv...@gmail.com
on 9 Jan 2014 at 2:20
@neoyag: the right way to do "headless" server-to-server oauth2 to (for
example) query analytics data is indeed JWT, especially if you don't even want
to have to fiddle around with authenticating over and over again.
@stevv: the google-go-api-client definitely has support for this flow.
see my example code here https://gist.github.com/rickt/7ac4f90f563a4215674b --
i use JWT to query and download analytics data, hopefully its exactly what
you're looking for.
let me know if you have any questions.
Original comment by ri...@rickt.org
on 7 Mar 2014 at 7:34
sorry for a second message, but i wrote a blog post about the pre-requisites to
doing headless/server-to-server oauth when querying analytics data, it might
also help...
http://code.rickt.org/2014/03/how-to-download-google-analytics-data.html
Original comment by ri...@rickt.org
on 7 Mar 2014 at 7:41
gist link is broken
Original comment by gpe...@cliftoncollege.com
on 9 Sep 2014 at 1:35
@gpe you're right! :( take a look at
https://gist.github.com/rickt/0c701ea850f6fc4a3301 and
https://gist.github.com/karalabe/8933476. the 2nd example uses the newer way of
using JWT.
Original comment by ri...@rickt.org
on 9 Sep 2014 at 1:41
Original issue reported on code.google.com by
neoyag...@gmail.com
on 14 Oct 2013 at 5:08