

The method of Files: get in Drive API is used. When fileId is NOT Google Docs file, you can use the following script. So in this answer, I would like to propose the following 2 patterns. Google Docs files are Google Document, Google Spreadsheet, Google Slides and so on.įrom your question, I couldn't understand about the file type you want to download.
At Google Drive API, the method for downloading the file is different between Google Docs and others.I think that in your script, the endpoint of ''+fileId cannot be used for downloading the file from Google Drive.Your access token can be used for downloading the file from Google Drive using Drive API.įor this, I would like to propose the following modification.You want to download a file from Google Drive.I believe your goal and situation as follows.
