video_by(id) fails if video is private #120

muffl0n opened this Issue Sep 16, 2012 · 1 comment


None yet
1 participant

muffl0n commented Sep 16, 2012

When trying to fetch a private video by id the request fails:

client = => user, :password => password :dev_key => dev_key)

id = ARGV[0]
video = client.video_by(id)
/home/muffl0n/.gem/ruby/1.8/gems/youtube_it-2.1.7/lib/youtube_it/parser.rb:10:in `initialize': 403 (OpenURI::HTTPError)
        from /home/muffl0n/.gem/ruby/1.8/gems/youtube_it-2.1.7/lib/youtube_it/client.rb:97:in `new'
        from /home/muffl0n/.gem/ruby/1.8/gems/youtube_it-2.1.7/lib/youtube_it/client.rb:97:in `video_by'
        from youtube.rb:7

The URL youtube_it calls is<id>?v=2&key=<dev_key>

When I switch the video to public everything works fine.

The Youtube-API-Documentation ( says:

Private, pending and rejected videos would not appear in a response to an unauthorized API request or a request for videos uploaded by someone other than the currently authenticated user.

So it seems that the API call doesn't know about the user I logged in with in the script.


muffl0n commented Sep 18, 2012

It's not bug. The documentation for the methods to retrieve private videos was just missing. See #122 for pull request.

@muffl0n muffl0n closed this Sep 18, 2012

chebyte added a commit that referenced this issue Sep 20, 2012

Merge pull request #122 from muffl0n/master
Adding get_my_video() and get_my_videos() to the README (see #120)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment