Open Joben28 opened 5 years ago
Thanks for pointing this out. I updated the wiki to remove these lines. We also need to update the example code.
For reference, here's the OAuth2 docs on redirect URIs and installed applications: https://developers.google.com/identity/protocols/OAuth2InstalledApp#step-2-send-a-request-to-googles-oauth-20-server
I think the following Wiki Page has some inaccuracy in it's code examples
Wiki Page: https://github.com/googleads/googleads-dotnet-lib/wiki/API-access-using-own-credentials-(installed-application-flow)
The following code is used in the example for fetching refresh tokens in a .NET console application.
The issue is that the example says to
but this caused the application to throw this error when running the application:
I have discovered that rather than setting
user.Config.OAuth2RedirectUri = null
, you avoid this issue entirely by just not setting the uri at all.The working code example
Either I was misunderstanding something, or this wiki documentation is inaccurate and caused a huge headache.
I hope this is the appropriate place to raise the issue.