Skip to content

Setting Things Up

tks18 edited this page Dec 2, 2020 · 23 revisions

1. Get Google Drive API Client ID, Client Secret, Folder ID and Refresh Token:

NOTICE: Some education mailboxes may not be able to open the API. This is because the administrator does not have open permissions. You can use your own account to create the API.

  • Enable Google Drive API for Your Account:

    • Here is the Link to Enable Drive API - Click Here

    • If You Have not Created any Project in Google Developer Console or if This is Your First Time Setup, It will Ask You to Create a New Project.

    • After Creating a New Project Enable the Drive Api.

Enable Drive API

  • Create an OAuth client ID:

    • The first creation will allow you to configure the consent screen, fill in the application name and save it directly.

    Create OAuth Client ID

    • Select Desktop app (It may change when you visit here, please hit and try!)

    • Then you can see the client ID (client_id) and client secret (client_secret), copy and save it.

    Created Client

  • Get refresh_token

    • Install Rclone

    • Enter the rclone config command, the following message will appear, please follow as shown.

    Rclone Config Rclone Config 2

    • In the browser, you may encounter the prompt in the figure below, this is because the API was created by us and has not been verified by Google.

    Rclone Config 3

  • Get root directory ID (root)

    • The root directory here refers to the root directory displayed by G-Index, which can be any directory in your network disk. Open the network disk to locate a directory or shared directory, the code at the end of the URL in the address bar is the directory ID. If the personal network disk parameter is left blank, it is the root directory of the network disk.

    • Example: https://drive.google.com/drive/u/1/folders/###########XYZ

Clone this wiki locally