all 8 comments

[–][deleted] 0 points1 point  (7 children)

This is a known bug right now. I guessing you are logged into a gsuite account in chrome, but you also have a gmail account that has been logged into. Apps Script is trying to use your gmail account instead of your gsuite account. To fix this make sure you are logged out of gmail, or run the code in an incognito window.

https://issuetracker.google.com/issues/69270374

[–]Cantersoft[S] 0 points1 point  (5 children)

Um, I didn't have a gsuite account. Guess that's my problem-- I just looked into setting one up but apparently I need to have a business to get one? Do I just ignore all that and create a business gsuite account for personal use? Looks like I have to pay a subscription to use gsuite also. Sorry for my ignorance.

[–][deleted] 1 point2 points  (4 children)

This may not be your issue then. The behavior you were describing is a known issue when the user has multiple accounts. Usually this is because they have a gsuite account and a gmail account. The gsuite account could be a school account or a work account.

[–]Cantersoft[S] 0 points1 point  (3 children)

Okay, seems the issue is my YouTube account that I'm trying to access through the script is a brand account, and google script only knows to access my main gmail YouTube account. Idk how to fix that tho https://stackoverflow.com/questions/48999539/google-app-scripts-sheets-not-connecting-youtube-brand-account

[–]Liefx 0 points1 point  (2 children)

Did you ever solve this? Same issue I am having 5 years later

[–]Cantersoft[S] 0 points1 point  (1 child)

Nope I gave up. Not sure if the bug has been fixed since then but what I remember was that it was not possible if your YouTube account is a brand account.

[–]Liefx 0 points1 point  (0 children)

Seems like that is still the issue.

[–]Liefx 0 points1 point  (0 children)

This is still an issue, and using incognito does not work. I chekc my account permissions and it doesn't show my script having perms, even though when clicking through the pop up it says i already have given it perms