This is a simple implementation of the Google Drive API v3 in GO
go mod tidy
go run main.go
- Create a new project in Google Cloud Platform
- Enable Google Drive API
- Create a new Google Credentials (OAuth Client ID/API Key/Service Account)
- For this project I used a Service Account for local implementation and for production I used default credentials by Google Cloud Platform (GCP) because we set the server in GCP
- Download the credentials file and put it in the root of the project
- Create a new folder in Google Drive and get the ID of the folder (Please add
google service account
as a member of the folder with the role of Editor) - Enjoy to try the API
https://developers.google.com/drive/api/quickstart/go https://pkg.go.dev/google.golang.org/api/drive/v3