问题描述
很长时间以来,我一直在使用Google脚本访问我的YouTube频道,并从中获取和修改某些信息,并将某些数据保存在Google表格中.
I am using, since a long time, a Google script that accesses my YouTube channel, gets and modifies some information from it and saves some data in a Google sheet.
它始终运行良好,但是大约一周前,Google以某种方式在我的普通帐户(主电子邮件)和YouTube帐户(使用不同的昵称)之间划分了我的访问权限.
It always worked fine, but then, about a week ago, Google somehow split my access rights between my normal account (primary email) and my YouTube account (that goes under a different nickname).
即使是最简单的命令,我也找不到运行方法:
I cannot find a way to run even the simplest command:
var my_playlists = YouTube.Playlists.list('snippet', {
mine: true,
maxResults: 50,
})
.items;
问题是google现在会提示我一个授权页面,我可以在2个帐户之间进行选择.一个是我的主要帐户,另一个是YouTube帐户.如果选择我的主要帐户,则代码会运行,但看不到YouTube帐户的数据.
The problem is that google now prompts me with an authorization page and I can choose between 2 accounts. One is my primary account, the other is the YouTube one.If I choose my primary account, the code runs but I cannot see the data of the YouTube account.
如果我选择YouTube上的YouTube,我仍然无法访问所需的数据,并且每次运行代码时,它都会不断征求许可.
If I choose the YouTube one, I still cannot access the data I want and it keeps asking for permission every time I run the code.
我知道两个渠道之间存在授权问题,但是我以前没有,也找不到解决该问题的建议.
I understand there is a problem of authorization between the two channels, but I did not have it before and cannot find any suggestion to solve it.
我可以解决什么问题?
推荐答案
我一直在为完全相同的问题而苦苦挣扎,但又有另一个原因.无论如何,到目前为止,我可以在自己的PERSONAL youtube帐户中操作任何所需的操作,使用OAuth授予对我的帐户的访问权限,但是如果授予对我的品牌帐户的访问权限,该脚本甚至无法开始执行,显然这是一个错误,它会导致脚本.
I've been struggling with the exact same issue but for another cause.Anyways, so far I can manipulate anything I want within my PERSONAL youtube account, granting access using OAuth to MY ACCOUNT, but if grant access to my branded account, the script doesn't even begin, apparently it's a bug that causes loop in the script.
您可以查看更多信息:
- 仅限YouTube Apps脚本API是否可以通过没有YouTube频道的帐户来运行?
- https://issuetracker.google.com/issues/36764531
- "> https://mashe.hawksey.info/2017/09/identity-crisis-using-the-youtube-api-with-google-apps-script-and- Schedule-Live-Broadcasts-from-google-sheets/
- 使用YouTube数据API来使用品牌帐户进行编辑播放列表
- YouTube Apps Script API only runnable by accounts without a YouTube channel?
- https://issuetracker.google.com/issues/36764531
- https://mashe.hawksey.info/2017/09/identity-crisis-using-the-youtube-api-with-google-apps-script-and-scheduling-live-broadcasts-from-google-sheets/
- Using Youtube Data API to Edit with Brand Account Playlist
这篇关于YouTube API和品牌帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!