Jump to content

YouTube api help (php unless you convince me otherwise)

I am trying to make a better youtube subscription box (after Linus complained about it on the WAN show :D) that will get all of the subscriptions a user has, find out the videos their subscriptions have loaded and then display the most recent ones in a page. I have identified the page from which you can find the subscriptions to be http://gdata.youtube.com/feeds/api/users/default/subscriptions?v=2 but when I try to load it, either through the google api demo (by manually editing the url), directly (by adding in my auth key as a parameter), or through my web app (having, as far as I know, authenticated with OAuth), it stays loading for ages before returning a 401 unauthorized message in the json that's returned

HTTP/1.1 401 User authentication required. X-GData-User-Country: GB WWW-Authenticate: GoogleLogin realm="https://accounts.google.com/ClientLogin",service="youtube" Content-Type: text/html; charset=UTF-8 Content-Length: 181 Date: Sat, 07 Sep 2013 13:45:34 GMT Expires: Sat, 07 Sep 2013 13:45:34 GMT Cache-Control: private, max-age=0 X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block Server: GSE Alternate-Protocol: 80:quic

User authentication required.[new line here but it's not working] Error 401

I'm basing it off editing the API samples. If somebody could make a short demo on how to make it authenticate correctly, it would be greatly appreciated. I am a noob at the YT api, so there will be loads of stuff that I've missed.

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×