google-api-python-client icon indicating copy to clipboard operation
google-api-python-client copied to clipboard

Improved documentation for InstalledAppFlow with use of Loopback IP and 404 not found

Open LindaLawton opened this issue 3 years ago • 3 comments

The documentation for Loopback IP address (macOS, Linux, Windows desktop) states that

To receive the authorization code using this URL, your application must be listening on the local web server.

However most of the samples for this library use.

flow = InstalledAppFlow.from_client_secrets_file(
                '/content/peopleapipublic-fc597768cf57.json', SCOPES)

When code using this method runs it will attempt to open a web browser window which returns a 404 not found as the samples do not describe how to listen on the local web server. so the code fails in most cases.

Please supply some documentation for use with installed applications that shows how to setup this local web server in order to no longer get a 404 error message when running applications.

LindaLawton avatar May 29 '22 20:05 LindaLawton

@LindaLawton Could you please share more info on which samples are you talking about?

Krishna-Seerapu avatar Jun 07 '22 00:06 Krishna-Seerapu

@LindaLawton I see that we currently have the sample to start the local server @ https://github.com/googleapis/google-api-python-client/blob/main/docs/oauth-installed.md#sending-users-to-googles-oauth-20-server

let us know if you are referring to some other sample docs?

Krishna-Seerapu avatar Jun 07 '22 01:06 Krishna-Seerapu

@Krishna-Seerapu I am getting the same error and yeah he is referring to same docs. I can also send you my copy of code if required. Thank you!

AniketRajpoot avatar Aug 25 '22 17:08 AniketRajpoot