-
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot update playlist for brand account using personal account #51
Comments
I removed that second step, as you're right, it is default now. Regarding the error, according to documentation, the |
The new (target) playlist was empty. How do I check the proper authorization? |
As in make sure that you own the playlist (there might be some conflict if you're trying to add to another user's playlist). Make sure that the playlist ID you put into the first column of the sheet does indeed point to the right playlist by going to the link |
I've also pushed a new change to the sheets script (to log more details on API fail errors) so if you could update your script in the script editor and post the result, that'd be great. |
Thanks for the administration. I copied the sheet freshly from the github starting page, granted access and the script ran. It failed with the following error.
See the attachments for my setup. |
One thing I'm noting is that the account you're using for the sheet is not the same as the YT account with the playlist (Purple A vs Dog profile icon). Please use the same account as the one that owns the playlist since there might be some complications with using a different account to add videos |
That may be the issue. However, the dog profile is my brand account (under the A account) which I've been using for several years and I'm kind of dependent on it. I'd like to avoid a migration to the A account, since I've been using the dog account for many years (playlists, subscriptions, comments and so on are connected to it). I'm going to verify that this is the problem and think about migrating. On the other hand I'd appreciate it very much, if you could find a way to support brand accounts. |
That's interesting, and it seems like the reason why it's giving a forbidden error. Brand accounts are completely separate from the personal accounts associated with them, so permissions are not transferable. According to this post, you can try logging into Google Drive/Sheets using that brand account and run the script under that account instead of the "A" account. This will be a temporary solution until I can figure out exactly how permissions work between playlists and if I can find a better solution than switching accounts. I'll see what I can do. |
I have the feeling the StackOverflow answer is outdated. I can't choose Google Drive as an product at https://myaccount.google.com when signed in as my brand. And I haven't found a way yet to log in with the mentioned @pages.plusgoogle.com address to Google Drive directly. It tells me I have the wrong password, when I'm using the A account's password. I contacted the StackOverflow user for advice. |
I can't find a way to login to google drive with the brand account. I assume google scrapped this feature together with google plus. |
Not sure if this is helpful, but it turned out to be really easy to just move my YouTube brand account to a personal Google. Then the script worked great (minus hitting my quota). Thanks for making this tool. |
I tried the method of generating a refresh token as mentioned in this Stackoverflow post about YouTube APIs, but I am a novice with regards to scripting, working with APIs, etc. How would I incorporate a generated refresh token into this script to make it work for a YouTube brand account? |
That would be pretty difficult and hard to automate without creating a whole new standalone app. I was able to generate a token for a brand account and then use that token to request data from an API, but I cannot do so using a google app such as Google Apps Script, since such an app restricts the caller of the script to be the main account and not a brand account. Basically, since google doesn't allow anyone to sign into a script with a brand account, we'd need to create a whole sign-in architecture that allows for brand accounts. For anyone who still wants to dive deeper into this issue, here's the process for creating a brand account token:
In terms of how to use this token, at least to test if it works, just send a request to any Google API with an auth header with your token and it should work. To run an Apps Script, the only way I can see is by using something like clasp to run the script remotely using a certain set of credentials (your generated token), but I have yet to see if this works. |
Long story short, if we wanted to do something about it, we might as well be Google employees |
Hi, here is the solution https://stackoverflow.com/a/64902884/7484338 |
I followed the instructions, but couldn't execute the second step completely:
I can't find any Google Developers Console in the
Resources / Advanced Google Services
dialog. According to https://developers.google.com/apps-script/guides/services/advanced#enabling_advanced_services that option is available fora standard GCP project (or an older default GCP project that was created prior to April 8, 2019)
.Nonetheless I tried to "Update Playlists" in the sheet document and this is the error message in the debug sheet:
Sorry for the German log message. It means something like
Couldn't update playlist with video (5Aq7jyS8AAU), ERROR: The following error occured at api call "youtube.playlistItems.insert": Forbidden
The text was updated successfully, but these errors were encountered: