Can not download files using Google Drive APIs V3

96 views
Skip to first unread message

sarah...@gmail.com

unread,
Jan 10, 2017, 10:52:47 AM1/10/17
to Google APIs Explorer Users Forum

Hello,


I'm trying to download files using Google Drive APIs V3 with 'alt=media' option. but I can't start download in a web browser.

My query is : GET https://www.googleapis.com/drive/v3/files/0B9jNhSvVjoIVM3dKcGRKRmVIOVU?alt=media

Its response is something like:


I've tried the third option which is 'webContentLink', with this one I can start download directly in browsers but I couldn't download files larger than 25MB.

So my question is : how can I start the download in browsers via the Google APIs ?


 Any help and answer is really appreciated.

John Boswell

unread,
Jan 10, 2017, 3:16:13 PM1/10/17
to Google APIs Explorer Users Forum
It looks like you're trying to do this in a browser (correct me if I'm wrong, but that screenshot looks like a browser developer's console panel).

In that case, webContentLink looks like the correct solution. Make that API call, then use the value returned for webContentLink either to redirect the browser or to display as a link for the user to click. That should start the download.

sarah...@gmail.com

unread,
Jan 11, 2017, 4:56:15 AM1/11/17
to Google APIs Explorer Users Forum
Hello,

Thanks for your answer.

You're right, I'm trying to do this in a browser ( the screenshot shows the response I am getting for my query GET https://www.googleapis.com/drive/v3/files/0B9jNhSvVjoIVM3dKcGRKRmVIOVU?alt=media)

I've already tried WebContentLink, it does start the download in a browser but I couldn't download files larger than 25MB and that's why I am using now, the first option which is Download a file — files.get with alt=media file resource

Do you have any idea to start download in browsers ?

John Boswell

unread,
Jan 11, 2017, 2:59:27 PM1/11/17
to Google APIs Explorer Users Forum
Can you be more specific about why you can't download files larger than 25MB? I just tested the webContentLink with a 30MB file and saw no issue.
Reply all
Reply to author
Forward
0 new messages