Download A Large File Faster From Google Drive

How To Download A Large File Faster From Google Drive - Working Method 2023

Google Drive is the best file hosting and storage platform available online. Google may restrict downloading large files for many reasons, but today in this guide I will tell you a few ways to quickly download very large Google Drive files using Google Drive API, CURL, Wget and OAuth methods.

If you can't download large files from Google Drive, the following methods will be very useful. Let's take a look at the best possible options for downloading large drive files, choose the method you think might work for you.


How To Download A Large File Faster From Google Drive - Working Method
How To Download A Large File Faster From Google Drive - Working Method


Step 1: Bring your file ID

So the first thing you need to do here is bring in the ID of the file you want to download. It's pretty simple and straight forward.

Follow these steps,


Open a notepad.

You will need to copy and paste the ID, authorization code and a PowerShell script.

Open your browser and go to your Google Drive, open the login with the account you want to download the file.

Locate the file you want to download and select it.

Right-click the file and click "Get Shareable Links" (see image below).

You don't have to copy the full link here; All you need is a file ID which we will use later.

The link will look like this: https://drive.google.com/file/d/XXXXX/view?usp=sharing

At this link, you only need to pay attention to the alphanumeric file ID displayed by xxxxx here.

Copy the file ID to Notepad.


Step 2: Get an OAuth code

This requires an OAuth 2.0 Authentication API key to allow PowerShell to access user-protected data (the file we want to download) into our Google Drive.

To achieve this.

Click here to see the OAuth 2.0 playground.

On the developer's webpage, click on the "Drive API v3" option in "Select and approve APIs" and select the https://www.googleapis.com/auth/drive.readonly option from the available options.

Once selected, click the Allow APIs button in the lower right corner of the tab.

After you click the Authorize APIs button, you'll be transferred to the Google Accounts login screen.

Select the same Google Account where you saved your files.

Allow Google OAuth 2.0 to access your Drive when prompted.

When you are redirected to the OAuth 2.0 Playground screen, click the "Exchange Authorization Code for Tokens" button as shown.

Copy the newly generated access token and save it to your Notepad. You will need it in the next step.


Step 3: Download the file using a command line script

If you are on Linux, open the terminal and use the following command:

curl -H "Approval: Carrier YYYYY" https://www.googleapis.com/drive/v3/files/XXXXX?alt=media -o ZZZZZ

And if you're on Windows, follow these steps.

Click the Start button

In Windows Search, search for "PowerShell", right-click and select "Run as administrator".

Click Yes in the next window and you will see Windows PowerShell Console pop up.

First copy this command to your Notepad,

Invoke-RestMethod -Uri https://www.googleapis.com/drive/v3/files/XXXXXX?alt=media -methodgate -headers @ {"Authorization" = "Bearer YYYYY"} -outfile ZZZZZ

Now replace the command "XXXXX" with the file ID that we copied in the first step and replace "YYYYY" with the access token copied in the second step.

"ZZZZZ" is any name of your choice that you want to put in the downloaded file. So, replace it with the name of your choice, for example, "downloadedfile.mp4", if you are downloading an mp4 file.


Previous
Next Post »