문제

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