4
votes

I have completed uploading videos to YouTube from my website, that's for particular user account only (means all videos uploaded to single user account). Now I want that user come to my site enter their YouTube username and password and selected video will be upload to their account.

Till now what i have done is i have uploaded videos to my own account with my developer key. But now i want that if any user uploads video to YouTube then it uploads to his/her account. I am not able to find out the way because it may possible that they don't have developer key which is required to upload. So i need help in this.

I have seen API but I am not able to work out help for this. Anyone can help me in this?

Thanks!

2

2 Answers

1
votes

It would be helpful if you could be more specific about what you are asking.

This is the youtube API for uploading videos: http://code.google.com/apis/youtube/2.0/developers_guide_protocol_uploading_videos.html

4
votes

You need to use the OAuth 2.0 API documented here: https://developers.google.com/youtube/2.0/developers_guide_protocol_oauth2 to obtain the credentials you need. Using the credentials you create a link to Google's authorization service which your customers follow. On that page they can either allow, or deny, access to their YouTube account to your service. Assuming permission is granted, the service will redirect to the "callback" location URL you provided along with a pair of access tokens. You can then use these tokens to upload videos to YouTube and the videos will appear in the customer's account as they they had uploaded them.