googleworkspace / go-samples

Go samples for Google Workspace APIs
Apache License 2.0
215 stars 100 forks source link

Credentials problem #39

Closed proyb6 closed 4 years ago

proyb6 commented 4 years ago

The Go documentation is incomplete and need help urgently on the step to create new credentials.json which it has additional missing key but I tried to generate a private JSON in Google API console is confusing that I'm stuck with no proper guidance. https://developers.google.com/sheets/api/quickstart/go?authuser=2

Someone has changed the credential requirements without inform anyone and create all the mess.

Go code for Sheetv4 is running on web server.

quenbyako commented 4 years ago

Holy moly, this issue didn't answered whole 2 weeks? I have this problem too, but i can't understand, what i do wrong. Jeez, two weeks ago example credentials has become rotten... @henry-jackson @sqrrrl i see, you was commited some examples, may be you can help?

sqrrrl commented 4 years ago

The issue appears to be related to having multiple accounts logged in and trying to use that button with the non-primary account (the presence of the ?authuser=2 query parameter.)

You can work around it by either using your primary account or creating a new user profile for the other account and log in as the primary one there. I ran through the quickstart using a primary account and was able to complete it successfully.

I did file a bug for the multi-account issue, but that'll take some time to get fixed.

In the future, please try to file more constructive issues. There's very little explanation of the actual error (to the contrary, it's quite misleading,) no screenshot or attempt to debug or isolate the issue.

Anyway, since the sample itself is fine and the login issue will be tracked elsewhere, closing this one.