on-internet
← Community

Downloading public google docs files in C#

Stack Overflow ·

This seems like it should be simple. I have a google docs file ID. I want to download it. My code: using Google.Apis.Auth.OAuth2; using Google.Apis.Drive.v3; using Google.Apis.Services; var fileId = "fileID goes here"; GoogleCredential credential = GoogleCredential .GetApplicationDefault() .CreateScoped(DriveService.Scope.Drive); var service = new DriveService(new BaseClientService.Initializer { HttpClientInitializer = credential, ApplicationName = "Appname" }); var request = service.Files.Get(fileId); try { request.Execute(); Console.WriteLine("Success"); } catch (Exception e) { Console.Write

Comments

Sign in or sign up to comment and upvote.

No comments yet.