Click here to Skip to main content
16,016,557 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
while trying to upload vedio to youtube i got "The remote server returned an error: (403) Forbidden."

please review below my code:

C#
YouTubeRequestSettings settings =
                      new YouTubeRequestSettings(ProjectName, DevKey
                          , GmailEmail, Pwd);

            YouTubeRequest request = new YouTubeRequest(settings);
            Video newVideo = new Video();
            newVideo.Title = "My Test Movie";
            newVideo.Tags.Add(new MediaCategory("Autos", YouTubeNameTable.CategorySchema));

            newVideo.Keywords = "cars, funny";
            newVideo.Description = "My description";
            newVideo.YouTubeEntry.Private = false;
            newVideo.Tags.Add(new MediaCategory("mydevtag, anotherdevtag",
            YouTubeNameTable.DeveloperTagSchema));
            //newVideo.YouTubeEntry.Location = new GeoRssWhere(37, -122);
            // alternatively, you could just specify a descriptive string
            // newVideo.YouTubeEntry.setYouTubeExtension("location", "Mountain View, CA");

            newVideo.YouTubeEntry.MediaSource = new MediaFileSource(flUpload.FileContent, flUpload.FileName, GetFileMime("avi"));
please help
Posted
Updated 1-May-12 7:20am
v3
Comments
ZurdoDev 1-May-12 12:54pm    
Reason for my vote of 1
What's the error?
Neosofty 1-May-12 13:12pm    
gives me below error
The remote server returned an error: (403) Forbidden

1 solution

Why are you not asking this question in
YouTubes Developer Forums
[^]??
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900