Skip to content

gyke69/curlGdrive

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

curlGdrive

This script is for downloading files from google drive via cli

Instruction

  1. get access token from google oauth 2.0 playground

https://developers.google.com/oauthplayground/

select https://www.googleapis.com/auth/drive.readonly under "Drive API v3" in select the scoope

  1. click the "Exchange authorization code for tokens" button and generate the access tokens

Deployment

Replace the following with yours.

TOKEN = access token from oauth2.0 playground

FILE_ID = the file ID from goole drive url

ex. https://drive.google.com/file/d/1rHAyhyhb55_mySUsGa7-JtoJxdYboAue/view?usp=drivesdk

1rHAyhyhb55_mySUsGa7-JtoJxdYboAue is the File ID

FILENAME = output FILENAME

  curl -H "Authorization: Bearer TOKEN" https://www.googleapis.com/drive/v3/files/FILE_ID?alt=media -o FILENAME 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%