Comments (9)
I was having the same problem as well.
A workaround is to configure as stated in the instructions, then when running go run quickstart.go
, follow the URL printed to stdout. That will lead you through the consent page and eventually redirect to localhost. That localhost call won't go anywhere, but if you copy the code={copy the value here}&state...
from the URL into the terminal window and paste, it will complete the token request flow and the sample will list the labels as intended.
This isn't a long term solution and I'd encourage the Google folks to follow through on a more comprehensive fix.
from go-samples.
This problem is also present in the calendar example, and I suspect many other too.
The reason is that the getTokenFromWeb
function seems to implicilty rely on the out-of-band token transfer functionality which was removed for good in January 2023, as mentioned in #83. New clients seem to default to a http://localhost
redirect URL, for which to work seamlessly the program would have to actively be listening on a port.
I happened to stumble upon exactly such listening implementation of this function in another repo. It's almost a drop-in replacement. One just needs to add a few imports, change the function name and pass the context, and it works!
from go-samples.
I am seeing the same problem.
from go-samples.
same here
from go-samples.
This same issue happens with the Google Drive quickstart.go
from go-samples.
I have the same problem
from go-samples.
This same issue happens with the Google Drive quickstart.go
Same problem with the Google Sheets example. Seems like a general problem, which is disappointing given this is intended to be learning material.
from go-samples.
Did anyone have a better example?
from go-samples.
Related Issues (20)
- Golang Gmail Api HOT 4
- Logger Error and how to fix it
- Credentials problem HOT 2
- Error 500: Requested Resource Too Large to Return, responseTooLarge
- token expired and refresh token is not set HOT 1
- Unable to parse client secret file to config: oauth2/google: missing redirect URL in the client_credentials.json exit status 1 HOT 2
- Specify sheet in spreadsheets HOT 1
- Getting Unauthorized HOT 1
- sheets.New() is depricated HOT 1
- don't get token
- Unable to view or download the file uploaded using File.get(File id)
- Feature Request: Manage Group members snippets HOT 1
- "No required module provides package" errors
- Dependency Dashboard
- [SyncRepoSettings bot] - Invalid config file
- Add Calendar Snippets
- Quickstart needs OOB update HOT 1
- Googlesheets Quickstart example unreachable in localhost HOT 3
- Error Malformed auth code HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-samples.