I am using the Google Drive API v3 to retrieve a file. I can upload files and list files, but the files.get call returns 'false'. The documentation is pretty sparse (https://developers.google.com/drive/v3/reference/files/get)
var contentRequest = gapi.client.drive.files.get({
fileId: fileId,
alt: 'media'
});
contentRequest.execute(function(resp) {
console.log(resp); // resp = false
});
If I remove the "alt: 'media'" parameter, then I get back the metadata as described in the documentation. I've also tried using:
gapi.client.request
( {
'path': '/drive/v3/files/'+fileId,
'method': 'GET',
'params': {'fileId': fileId, 'alt': 'media'},
'headers': {'Authorization': 'Bearer ' + gapi.auth.getToken().access_token }
}).execute(function(file) {
// file = false
});
The only breadcrumb of hope that I can find is buried away in the Google Client REST API documentation, which says that the response is 'false' if not JSON-parseable. https://developers.google.com/api-client-library/javascript/features/promises
The type of file appears to make no difference... So far I've tried .html and .txt.