title: Getting File Not Found on Export of Google Drive
body: <p>I'm getting a 404 file not found error when using the google drive v3 API. The file-Id I'm getting from google picker so I know the id is correct. The offending code is as following (javascript):</p>
  
  <pre><code>downloadFile: function () {
        var _this = this;
        gapi.client.init({
          apiKey: this.developerKey,
          clientId: this.clientId,
          discoveryDocs: ['https://www.googleapis.com/discovery/v1/apis/drive/v3/rest'],
          scope: 'https://www.googleapis.com/auth/drive'
        }).then(function () {
          // not working with private files
          gapi.client.setToken(_this.oauthToken);
          gapi.client.drive.files.export({
            'fileId': _this.selectedFileId,
            'mimeType': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
          }).then(function (response) {
              console.log('success!');
            });
          }, function (error) {
            console.log(error);
          });
        }, function (error) {
          console.log(error);
        });
      }
  </code></pre>
  
  <p>Funnily enough it doesn't happen with all files only private files. So I assume the file not found error is just a generic response back from google indicating I wasn't allowed to access the file.</p>
  
  <p>Oddly enough doing a files.get works fine:</p>
  
  <pre><code> gapi.client.drive.files.get({
           fileId: _this.selectedFileId,
         supportsTeamDrives: true
         }).then(function (response) {
           console.log('worked');
         }, function (error) {
             console.log('failed');
         });
  </code></pre>