質問

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