I am using C#, Google .NET API. How can I create a folder in Google Drive root location? Any code will be helpful. Thanks
A folder can be treated as a file with a special MIME type: "application/vnd.google-apps.folder".
The following C# code should be what you need:
File body = new File();
body.Title = "document title";
body.Description = "document description";
body.MimeType = "application/vnd.google-apps.folder";
// service is an authorized Drive API service instance
File file = service.Files.Insert(body).Fetch();
For more details check the docs: https://developers.google.com/drive/folder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With