3
votes

I'm having trouble grabbing the last 4 upload "unlisted" videos from my youtube account. I can do it with public but it won't work with unlist. Is there a gdata api i can use?

this is what I use for public and then parse the results. https://gdata.youtube.com/feeds/api/users/UserName/uploads?orderby=updated&max-results=4

3
You will probably need to Authorize request: developers.google.com/youtube/2.0/…. Which language do you will use ?moul

3 Answers

1
votes

You can try to authenticate your request

see : https://developers.google.com/youtube/2.0/developers_guide_jsonc

shell example :

# getting auth token
TOKEN=$(curl --silent 'https://www.google.com/accounts/ClientLogin' --data-urlencode Email=YOUR_EMAIL --data-urlencode Passwd='YOUR_PASSWORD' -d accountType=GOOGLE -d source=SO -d service=youtube | grep Auth)

# call api with Authorization
curl --silent --header "Authorization: GoogleLogin $AUTH" "https://gdata.youtube.com/feeds/api/users/UserName/uploads?orderby=updated&max-results=50"

for PHP, take a look at this page : http://code.google.com/p/oauth-php/wiki/ConsumerHowTo

0
votes

Unfortunately, I don't think this is possible due to the intended privacy of unlisted videos.

From the developer guide: https://developers.google.com/youtube/2.0/developers_guide_jsonc

"Unlisted videos are not included in search results or displayed in any other way, and a user can only reach an unlisted video by entering or linking directly to the video's watch page URL."

0
votes

It's a bit tricky. Unlisted video is the one that a) does not have b) has

However, the problem is that YT upload API does not return for any video entry, just only or none. You probably have to make another API call to pull up the video's yt:accessControl ?