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.

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top