'Why does the webContentLink access I get through the http interface of the Google cloud disk list report 404

I obtained the file download url through the following interface, and the corresponding field is webContentLink, but why did I return a 404 status code when I accessed this download url. I have tested this problem only with some of these accounts. There is no idea to solve this problem now.

interface address:https://developers.google.com/drive/api/v3/reference/files/list?hl=en&authuser=1



Solution 1:[1]

According to their docs, WebContentLink is only available for files with binary content in Google Drive.

If you want to download all kind of file then use the files.get method with the ID of the file to download and set the alt=media URL parameter

Reference: https://developers.google.com/drive/api/guides/manage-downloads#download_a_file_stored_on_google_drive

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 adeel41