Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.8K
Views
Download the file from Google.Drive via WebClient C#

Me need to download the file at: https://drive.google.com/u/0/uc?id=1sSR9kWifwjIP5qFWcyxGCxN0-MoEd_oo&export=download

But after downloading the file, I get just a document with a single line: "Google Drive-Virus scan warning". In theory, I should download the file from the link specified in the url (I got it through the browser console), but instead I download an incomprehensible document with one line. As far as I understand, I download the page markup, but not the file itself. How can this be fixed ?

To download a file, use the following method:

using System;
using System.Net;


public class Program
{

    public static void Main(string[] args)
    {
        {
            string url = "https://drive.google.com/u/0/uc?export=download&confirm=pKfr&id=1sSR9kWifwjIP5qFWcyxGCxN0-MoEd_oo";
            string savePath = @"C:\Users\Saint\Desktop\TaskRetail\yml.xml";
            WebClient client = new WebClient();
            client.DownloadFile(url, savePath);
            Console.ReadLine();
        }
    }
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Ref: https://bytesbin.com/skip-google-drive-virus-scan-warning-large-files/

Create Credentials:

enter image description here

An API key will be generated, copy the key and paste it somewhere as we will need it later.

enter image description here

Step 2. Tweak Shared URL

Look for the Google Drive file that you wish to download directly without any virus warning. Here copy the File ID and paste it somewhere safe

enter image description here

Open Chrome and Enter the following Google APIs URL.

https://www.googleapis.com/drive/v3/files/FileID?alt=media&key=APIKey

Enter the file id copied in the fileID section and the API Key in the APIKey section.

enter image description here

Hit Enter and the file will start downloading without any warning symbol.

enter image description here

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!