This C# library simplifies interaction with the Google Drive API. While it doesn't cover the entire API, it includes the most commonly used endpoints for easier access to Google Drive.
🚧 Pre-release — The library is in active development approaching v1.0.0.
| Category | Status |
|---|---|
| Authentication | ✅ Complete |
| File Upload/Download | ✅ Complete |
| Folder Management | ✅ Complete |
| File Management (move, rename, copy) | ✅ Complete |
| Trash Operations | ✅ Complete |
| Advanced Search | 📋 Planned |
See the full Roadmap for detailed feature tracking.
- Google.Apis.Drive.v3 Package Overview
- Downloading Files from Google Drive
- Understanding Folder Hierarchy and Cycle Dependencies
Note: This library is not a full reflection of the real Google Drive API but implements the most commonly used API endpoints to simplify interaction with Google Drive.
Add the Google Drive API NuGet package to your project:
dotnet add package Google.Apis.Drive.v3Download this library or create our own implementation based on this template.
See Google Cloud Console Setup.
- Place the downloaded
credentials.jsonfile in your project directory. - Initialize the
GoogleDriveApiclass with your credentials.
For testing samples just place downloaded
credentials.jsonin samples/Shared directory. If you want to share more files across sample project include them inDirectory.Build.targetsconfig file.
First, create an instance of the GoogleDriveApi class using the fluent builder pattern with your credentials and token paths:
using GoogleDriveApi gDriveApi = await GoogleDriveApi.CreateBuilder()
.SetCredentialsPath("credentials.json") // default value "credentials.json"
.SetTokenFolderPath("_metadata") // default value "_metadata"
.BuildAsync();Additional sample code snippets are available in the Sample Code Snippets file.
This project is licensed under the MIT License. See the LICENSE file for details.
We welcome contributions! Please read our Contributing Guidelines to get started.