Open GoogleCodeExporter opened 9 years ago
The difficulty is with Google's OAuth2 authentication process, which requires
that the user authenticates directly with Google's secure web server using a
web browser. See step 2 at
https://developers.google.com/accounts/docs/OAuth2
According to that page, it is definitely possible to create a command line
application, but it will always be necessary to authenticate using a browser.
The example given has the user copy a token from that browser session to the
command line. I suppose that urllib could be used to respond to the Google
authentication page, instead of using a browser.
The previous alternative, was to use ClientLogin, as per the example about
halfway down
http://stackoverflow.com/questions/101742/how-do-you-access-an-authenticated-goo
gle-app-engine-service-from-a-non-web-py
Unfortunately, according to
https://developers.google.com/accounts/docs/AuthForInstalledApps
that API has been deprecated as of April 2012!
I am happy to provide a simplified non-GUI HTTPS interface to GTB to enable
users to use urllib2 to retrieve data, if somebody can write the client-side
code that successfully authenticates using OAuth2.
Cheers,
Julie
Original comment by Julie.Sm...@gmail.com
on 24 May 2012 at 7:16
Is this LinkedIn example useful?
https://developer.linkedin.com/documents/getting-oauth-token-python
It points to the example code here:
https://github.com/synedra/python-oauth2/blob/master/example/client.py
Original comment by j...@kleckner.net
on 7 Sep 2012 at 9:38
This guy shows how to do this with Twitter:
http://talkfast.org/2010/05/31/twitter-from-the-command-line-in-python-using-oauth
Original comment by j...@kleckner.net
on 7 Sep 2012 at 9:50
Nice overview here:
http://blog.andydenmark.com/2009/03/how-to-build-oauth-consumer.html
Original comment by j...@kleckner.net
on 7 Sep 2012 at 9:58
Original issue reported on code.google.com by
srom...@gmail.com
on 30 Apr 2012 at 5:35