The whole process consists of 5 high-level steps:
On Google Cloud Console:
- Create a project on Google Cloud Platform
- Enable Google Drive API
- Setup OAuth consent screen so you can grant permissions required by this extensions
- Create and download OAuth credentials-json
In VSCode:
5. Provide credentials-json to this extension within VSCode
-
Create new project
${your-project-name}on Google Cloud Platform: -
Header --> Side menu -->
APIs & Services -
APIs & Services.SideMenu --> Library. -
Search for
Google Drive API, select from the search results and clickEnable.

-
APIs & Services.SideMenu -->OAuth consent screen. Go through step-by-step process there. On thescopesstep clickAdd or remove scopesand filter byGoogle Drive API:

-
Choose few specific scopes:
.../auth/drive.file.../auth/drive.readonly
WARNING: `.../auth/drive` scope will provide the extension with unlimited access to your files. Use with caution. -
If you want to access your personal google-drive (...@gmail.com) and not using an account of some organization (
...@custom-company.com), then you need to mark your app as anExternaland add your email on theTest usersstep:

-
APIs & Services.SideMenu --> Enabled APIs & services, at the bottom of the page see the table of the services --> click onGoogle Drive API. It should navigate you to the page: -
See
Credentialstab a bit below the header, click+ Create Credentialsto the right of the page, selectOAuth Client ID

-
Once you see
OAuth client createdpopup, click onDownload JSON

-
Return to VSCode, open command palette, run
google.drive.configureCredentialscommand and select path to the downloaded JSON -
Reload VSCode (run
Reload windowcommand) and click onDriveplugin icon on the side bar. You should be automatically navigated to your web-browser where you should see the OAuth consent popup:WARNING: You may see a warning-popup prior to the actual consent popup saying that you have to trust a developer of that extension. Please inspect the source code to make sure you privacy is not corrupted.This is an example of a popup that you see in case you setup an app constraint to some organization (i. e. accessed from corporate emails
...@custom-company.com)
We're done! Happy browsing your Drive files ;)
