One Time Download for Google Drive


This is a sample script for downloading files from Google Drive by the one time download method.


When you download a file from Google Drive, in generally, the login and the access token are required. If you want to download the file without the authorization for the simple situation, the file is required to be publicly shared. But the file might not be able to be shared publicly, because of various reasons.

For this situation, I would like to provide a workaround. In this workaround, the file is publicly shared. But the file is publicly shared for only one minute. I noticed that when the publicly shared-file is downloaded from Google Drive, even if the permissions of file is changed not to be shared publicly after the download was started, the download is kept. In this workaround, I used this. In this case, it might be required to be called the pseudo one time download. The flow of this workaround is as follows.

You can see the detail information