Question

An example is GoogleCL non-browser client as explained here :

http://www.maketecheasier.com/beginner-guide-googlecl/2010/06/23

When you attempt to use the google command for a service for the first time, it will open your web browser and ask you to authenticate it. Click “grant access” and then press Enter back in the terminal window.

How Google webservice transfer data back to GoogleCL from the browser ?

I want to do the same kind of callback with my own webservice so I'd like to understand how.

Was it helpful?

Solution

By using a Redirect URI of http://localhost and starting up a local webserver to wait for that redirect. See the code for the tools.run_flow() function in the Google API Python Client library that does this kind of flow:

https://code.google.com/p/google-api-python-client/source/browse/oauth2client/tools.py#110

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top