So after much research, digging and a little less hair, I figured out a few things.
First, log into the "Google Cloud Console". If you're using GAE (Google App Engine) and you click on your GAE project and enable the "YouTube Data API v3", you are guaranteed to get NO WHERE! Instead, back out of your GAE project, and create a new Project called "API Project" for example.
Then within that project, enable your desired API's and you'll begin to get better results. Much better results. Start first with trying a YouTube search. This allows you to just insert your API key and you don't have to mess with OAuth2 and it requires less dll's, so its a good place to start. Try something like the following:
YouTubeService youtube = new YouTubeService(new BaseClientService.Initializer() {
ApplicationName = "{yourAppName}",
ApiKey = "{yourApiKey}",
});
SearchResource.ListRequest listRequest = youtube.Search.List("snippet");
listRequest.Q = "Loeb Pikes Peak";
listRequest.MaxResults = 5;
listRequest.Type = "video";
SearchListResponse resp = listRequest.Execute();
foreach (SearchResult result in resp.Items) {
CommandLine.WriteLine(result.Snippet.Title);
}
Feel free to replace CommandLine with regular Console print stmts.
Next, move on to OAuth 2.0 and try to get your credentials to go through without erroring. You'll need to download your OAuth JSON file from "Google Cloud Console" under the "Credentials" section. Once you have this file, replace any files named "client_secrets.json" with the contents of the downloaded json file. In order to get the authorization to work, I found that I was missing the Microsoft.Threading.Tasks.Extensions.Desktop.dll which is the dll that allows the browser to open a window to grant access for the Native Application to muck with your YouTube acct. So if you have some errors during the Authorization part, check the inner exception and there's a chance that might be your issue as well.
Disclaimer: The bottom half of the code shown below was snarfed from: github.com/youtube/api-samples/blob/master/dotnet
UserCredential credential;
using (FileStream stream = new FileStream("client_secrets.json", FileMode.Open, FileAccess.Read))
{
credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
GoogleClientSecrets.Load(stream).Secrets,
new[] { YouTubeService.Scope.Youtube, YouTubeService.Scope.YoutubeUpload },
"user",
CancellationToken.None,
new FileDataStore("YouTube.Auth.Store")).Result;
}
var youtubeService = new YouTubeService(new BaseClientService.Initializer()
{
HttpClientInitializer = credential,
ApplicationName = Assembly.GetExecutingAssembly().GetName().Name
});
var video = new Video();
video.Snippet = new VideoSnippet();
video.Snippet.Title = "Default Video Title";
video.Snippet.Description = "Default Video Description";
video.Snippet.Tags = new string[] { "tag1", "tag2" };
video.Snippet.CategoryId = "22"; // See https://developers.google.com/youtube/v3/docs/videoCategories/list
video.Status = new VideoStatus();
video.Status.PrivacyStatus = "unlisted"; // or "private" or "public"
var filePath = @"REPLACE_ME.mp4"; // Replace with path to actual movie file.
using (var fileStream = new FileStream(filePath, FileMode.Open))
{
var videosInsertRequest = youtubeService.Videos.Insert(video, "snippet,status", fileStream, "video/*");
videosInsertRequest.ProgressChanged += videosInsertRequest_ProgressChanged;
videosInsertRequest.ResponseReceived += videosInsertRequest_ResponseReceived;
videosInsertRequest.UploadAsync();
}
So there's my 2 cents worth. Also, you'll need to do a NuGet on DotNetOpenAuth and within your code, replace any "using" calls to Google.Apis.Auth.OAuth2.DotNetOpenAuth to just "using DotNetOpenAuth".
Hopefully this helps others. The big thing was figuring out the GAE versus a new project. Once I figured that out, normal amounts of research started yielding results rather than pure frustration!!