1
votes

I'm using PHP (CodeIgniter framework).

The project I'm working on will let users upload videos to server. It is required that the video is also uploaded to Youtube under a specific account (the site's). I'm aware that this is not the recommended practice but it's the ideal way to go since most of the users don't have gmail account.

I've been reading Youtube's documentation, but got confused real quick. Can anyone explain the step-by-step to achieve what I want to do? From what I'm thinking, I need a long-lived access token for my site and when user finishes uploading, I will call Youtube API with this long-lived access token to upload it to my site's Youtube channel. But I don't know whether Youtube API supports this or not.

I've found this library : CI Youtube Library but from what I read, this library also requires my web user to log in with their Youtube account, so I guess it's not what I'm looking for.

Thanks for the help!

2

2 Answers

2
votes
  • The suggested way is to have your users upload with their account and you moderate what goes into your account. Otherwise they may upload an offensive, illegal video and you may have to get accounted for that. It's not any different than sharing your password publicly.
  • There are also quota limits for upload and you will hit those limits really fast, if you try to upload from same account.
  • They won't need "gmail" account, by using authentication, they will just link any of their accounts to a Google account really fast. There are no long lived tokens for security reasons. In case of an unwanted access, short lived tokens are more secure.

You can get all the rest of information at "https://developers.google.com/youtube/v3/getting-started"

1
votes

Because your users are uploading to YOUR Youtube account, they shouldn't need to login to yours. If you authenticate your site's youtube account, that is the only token they should need.