问题
I have a gmail account ( sans google plus ) that has a number of brand accounts. Each brand account has it's own youtube channel that gets different video content published.
I've written a simple Google Apps Script to insert a video into one of the brand accounts playlists but this does not work. The script itself should work fine but the issue is with permissions.
When running the script, your prompted to give it permission. I've tried running it as the account owner that owns the brand account but I get a forbidden error. So it seems it has to be ran as the brand account itself.
The brand account in question does have an associated @pages.plusgoogle.com email address that has a password which you can use to login directly with. I suspect this is the correct account to run it under but every time I do so I accept the permissions and the script doesn't run. Each time I attempt to run it thereafter the process repeats, I'm asked to accept the permissions and the script doesn't run.
How do I run the script as the brand account and accept the permissions?
回答1:
It seems the issue was that I needed to login to Google Drive with the brand account's @pages.plusgoogle.com account and run the script.
Above, I tried to run the script while signed in to Drive as the account owner. If you do this it will ask you, when you run the script, which account do you want to run it under? But as the original question shows it doesn't matter what you choose it won't run.
To clarify, you have to actually be signed in to drive.google.com as the brand account for it to work.
来源:https://stackoverflow.com/questions/50283549/using-youtube-data-api-to-edit-with-brand-account-playlist