Search code examples
androidgoogle-drive-apigoogle-drive-android-api

How to get the direct download link of a file by google drive api v3 in java


How to get the direct download link of a file by google drive api v3 in java ?

Hi all, I've worked with Google Drive Api in Android for a week, I used both Android Drive SDK and Drive Rest Api for java but I can't find the way how to how to get the direct download link of a file (anyone can read) on Drive. I've try How to get the url of a file of google drive to download in android but it's not work. Please help me. Thanks.


Solution

  • Given that you have the actual FILE-ID for the file , you can download it using the download link

    drive.google.com/uc?id=FILE-ID&export=download