Get the file ID:
- Go to your Google Drive in your browser.
- Right-click (or control-click) the file you want to download and click “Get shareable link”. The link looks like this:
https://drive.google.com/open?id=XXXXX
. Make note of the file ID “XXXXX”; you will be needing it below.
Get an OAuth token:
- Go to OAuth 2.0 Playground
- In the “Select the Scope” box, scroll down, expand “Drive API v3”, and select
https://www.googleapis.com/auth/drive.readonly
- Click “Authorize APIs” and then “Exchange authorization code for tokens”. Copy the “Access token”; you will be needing it below.