Reputation: 719
I am trying to download some *.FIT files using Google Drive API for Go, from a private folder stored in my Google Drive. (Garmin 310XT data)
I have followed the wizard and guide found here, and have successfully obtained a full list of files from a folder by id.
I am using this sample code, but I cannot download any of the files. Both the file DownloadUrl and the ExportFormats properties are always empty. Has anyone successfully done this, or am I just missing something important?
Edit: The first problem was about scope, but after changing it to drive.DriveScope I can only download 0 byte files.
Using the correct http.RoundTripper solved the 0 byte size issue. (client.Transport)
Upvotes: 2
Views: 2094
Reputation: 54107
Is the file restricted?
See files docs under labels.restricted
labels.restricted
boolean
Whether viewers and commenters are prevented from downloading, printing, and copying this file.
Upvotes: 1