This is a sample script for exporting a project on Google Drive to local PC using Golang Quickstart. A file with refresh token is saved to the same directory with this script as go-quickstart.json. Before you run this script, please enable Drive API on your Google API console.
- In order to export project, both
drive.DriveScriptsScopeanddrive.DriveScopehave to be included in the scope. - The mimeType for exporting has to be "application/vnd.google-apps.script+json".
If you already have the file with refresh token, at first, please delete it and run this script. By this, the scopes of refresh token and access token are updated.