I want to use the googlesheet API for reading/updating sheets in a Golang desktop app. I have already created an oauth2 client ID selecting the desktop app option. This generates me a credentials file with a redirect_uri value, and that's my issue.
I tried the code sample from here https://github.com/googleworkspace/go-samples/blob/main/sheets/quickstart/quickstart.go
It correctly sends me the auth link to login through google site, but at the end it tries to load the redirect_uri, and my app is standalone and is not supposed to be related to any web service to complete the authentication process.
How can I get rid off the redirect step to grab directly the token ? Using an API key is not a solution because it is not allowed to use update operations on sheets.