无法使用拥有YouTube频道的帐户使用OAuth [英] Unable to OAuth with account that owns YouTube channel

查看:258
本文介绍了无法使用拥有YouTube频道的帐户使用OAuth的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Google帐户,我之前在使用v2 YouTube API上传视频。我猜这个帐户有两个帐户链接到它,因为当我通过OAuth流动时,我必须选择哪个帐户。



第一个帐户,我设置API在开发者控制台中,我可以选择授权YouTube API控件。
实际上是YouTube频道的第二个帐户只说我将应用程序离线访问,没有指定与YouTube相关的权限。



我使用1st帐户完成了自己的OAuth,因为该帐户实际上列出了youtube权限。得到我的刷新令牌并将其添加到应用程序。但是,当我尝试将视频插入到YouTube时,出现以下错误:
代码401未经授权:youtubeSignupRequired



好像我没有即使它们都在同一个Google帐户上,也可以与所有YouTube频道帐户相关联。



有没有人遇到过这个问题?
顺便说一下,我确信我的API调用正常工作,因为我们可以从开发环境中进行上传。开发者帐户只有一个帐户,但它拥有与API相同的帐户。

解决此问题。



事实证明,我需要使用第二个帐户(即YouTube频道的帐户)进行OAuth。尽管它没有请求任何与YouTube相关的权限,只能获得离线访问权限,但我能够使用我收到的刷新令牌成功上传。



绝对是最不合逻辑的案例解决方案是正确的。


I have a google account that I was previously uploading videos to using the v2 YouTube API. This account I guess has two accounts linked to it, because when I go through OAuth flows I have to choose which account.

The 1st account, the one I setup the API in developer console, gives me the option to authorize YouTube API controls. The 2nd account, the one that actually is the YouTube channel, only says that I'm giving my application offline access, there is no permissions specified relating to YouTube.

I did my OAuth using the 1st account, since that one actually listed youtube permissions. Got my refresh token and added it to the application. However, when I go to attempt to insert a video to YouTube I get the following error: Code 401 Unauthorized: youtubeSignupRequired

It's as though I'm not linking at all to the YouTube channel account even though they are both on the same Google account.

Has anyone encountered this before? By the way, I know with certainty that my API calls work properly, as we were able to upload from the dev environment. The dev account is only a single account though that owns the channel on the same account as the API.

解决方案

I was able to resolve this.

It turned out I needed to do the OAuth with the 2nd account, the one for the YouTube channel. Despite it not requesting any permissions related to YouTube and only getting offline access, I was able to successfully upload using the refresh token I received.

Definitely a case of the most illogical solution being the correct one.

这篇关于无法使用拥有YouTube频道的帐户使用OAuth的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆