Youtube API: Upload to developer's account

2020-07-10 11:06发布

here's what I want to achieve:

Users are able to upload videos to my youtube account via a simple web form.

Here's what I don't get:

This is possible using the deprecated ClientLogin authentication. But it is not using OAuth 2.0 authentication, because this one's logging the user always in to his own account, not mine. Correct? If not, how do I use the OAuth authentication to enable users to upload videos to my youtube account?

Thank you for your help!

4条回答
Anthone
2楼-- · 2020-07-10 11:42

Does Jan Gerlinger's answer work? I also get the error saying that the email address is already associated to an other Google account. I guess it's not possible with v3, but can it be done with v2?

查看更多
【Aperson】
3楼-- · 2020-07-10 11:52

Google's OAuth2 authorization server supports the use of Service Accounts. They are meant for exactly this use case. This should work for the Youtube API too.

You can create a Service Account in Google's API Console. There you get a Service Account email address, that you have to setup as alternative email address for the Google account you use for your Youtube videos.

查看更多
对你真心纯属浪费
4楼-- · 2020-07-10 11:53

If this issue is still https://code.google.com/p/gdata-issues/issues/detail?id=5370 UNRESOLVED it is NOT possible to use Service Account with YouTube v3 data API. As of March 2014 I am not able to create/list new Playlist or post a video to an existing playlist. The Google folks should REALLY make this explicit as I waste few hours with this.

查看更多
Fickle 薄情
5楼-- · 2020-07-10 11:56

OAuth2 Service Accounts do not work for Youtube API: https://developers.google.com/youtube/v3/docs/errors

This error is commonly seen if you try to use the OAuth 2.0 Service Account flow. YouTube does not support Service Accounts, and if you attempt to authenticate using a Service Account, you will get this error.

查看更多
登录 后发表回答