I get a 403 (forbidden) error when I try to search the Google playlist. If I remove .Query, it works fine. I know that the credentials work fine, since I use them in other places of the application without problems.
Am I mistaken about this, or is it impossible? I am using version 1.8.0.0 api (new download).
void SearchPlaylistVideos(string playListId, string query) { YouTubeQuery videoQuery = new YouTubeQuery(String.Format("http://gdata.youtube.com/feeds/api/playlists/{0}", playListId)); videoQuery.Query = query; Feed<Video> feed = CreateAuthenticatedRequest().Get<Video>(videoQuery); foreach (Video entry in feed.Entries) { //Response.Write("<br />" + entry.Title); } } YouTubeRequest CreateAuthenticatedRequest() { YouTubeRequestSettings settings = new YouTubeRequestSettings ( ConfigurationManager.AppSettings["GData.AppName"], ConfigurationManager.AppSettings["GData.DeveloperKey"], ConfigurationManager.AppSettings["GData.Email"], ConfigurationManager.AppSettings["GData.Password"] ); settings.Timeout = 1000000; return new YouTubeRequest(settings); }
source share