3

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

acctman
  • 4,229
  • 30
  • 98
  • 142
  • You will probably need to Authorize request: https://developers.google.com/youtube/2.0/developers_guide_protocol_oauth2#OAuth2_Authentication. Which language do you will use ? – moul Mar 16 '12 at 01:39

3 Answers3

1

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

moul
  • 543
  • 3
  • 10
0

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 ?

0

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."

stan
  • 4,885
  • 5
  • 49
  • 72
  • can I just login to my account and grab the links that way? – acctman Mar 16 '12 at 02:01
  • You can retrieve unlisted videos using just an API key if you add them to a playlist. If you do not add them to a playlist they will not be accessible using the API key and you will need to go the OAuth route. See answer https://stackoverflow.com/a/56652852/2344394 – vvvv4d Jun 18 '19 at 16:18