Using Google API for .Net
Let's using uploading a video to YouTube as an example:
- Install Google API NuGet packages. This can be easily done in VS.
- Create a client ID at API Access pane
- Download client_secrets.json from API Access pane and save in the project. Make sure set the Build Action to Resource for this file.
- Refer to the example of Google Google API Client Library for .NET OAuth 2.0 page to get a UserCredential. Use YouTubeService.Scope.YoutubeUpload in the scopes parameter.
- If this is a Windows Phone project, disable XAML validation to remedy a bug.
- Refer to the YouTube Data API video uploading example for the uploading code.
- It is critical to enalble YouTube Data API in Google Developer Console. Without enabling it, one will get 404 error when uploading a video.