7

This is the extension to this question. All the solution on that post I tired doesn't work for now, unfortunately, since I don't have enough reputation to comment on that post, I can only make a new post about it.

The question is how to download large file using only terminal. An example large file is this

I think the most recent solution is using gdown. Since the id for the file above is 1Vq_UO-T9345uYs8a7zloukGfhDXSDd2A, I tried:

gdown --id 1Vq_UO-T9345uYs8a7zloukGfhDXSDd2A

and I received error message:

Too many users have viewed or downloaded this file recently. Please try accessing the file again later. If the file you are trying to access is particularly large or is shared with many people, it may take up to 24 hours to be able to view or download the file. If you still can't access a file after 24 hours, contact your domain administrator.

The most recent solution suggested on this github discussion page also suggest the same error is received when downloading a huge file, >50gb

3
  • (1) this is not a programming question or problem, and is not ontopic now, although many years ago topicality was broader and existing Qs remain (2) this is a restriction at the server (google) side; it doesn't matter what client(s) you use if the server doesn't permit the download Commented Dec 15, 2020 at 21:08
  • Thanks for the comment. Could you possibly explain why would the server side allow user to download large file by clicking it on the browser, but not gdown or wget method described in the github post? Commented Dec 15, 2020 at 22:38
  • No idea. It's google's system and 'they' decide how to run it. (In scarequotes because an organization doesn't really make decisions, the people in it do, and I don't know which of the many many people at google are responsible for this.) Commented Dec 18, 2020 at 1:47

1 Answer 1

37

You can try generating an OAuth token

  • Go to OAuth 2.0 Playground https://developers.google.com/oauthplayground/
  • In the Select the Scope box, paste https://www.googleapis.com/auth/drive.readonly
  • Click Authorize APIs and then Exchange authorization code for tokens
  • Copy the Access token
  • Run in terminal
curl -H "Authorization: Bearer ACCESS_TOKEN" https://www.googleapis.com/drive/v3/files/FILE_ID?alt=media -o FILE_NAME 
Sign up to request clarification or add additional context in comments.

3 Comments

I tried this and it works perfectly. It's the only solution that has eradicated the "Too many users..." message for me and allowed me to write a script to bulk download a massive list of files from Google Drive automatically.
In my case, I need to add -C - in case it needs to be resumed: curl -H "Authorization: Bearer ACCESS_TOKEN" -C - https://www.googleapis.com/drive/v3/files/FILE_ID?alt=media -o FILE_NAME. And it works in January 2023!
Is there a convenient way to do this for a folder?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.