Google Drive
6/22/25GuideStorageGuideNative RroxyOfficialAbout 4 min
Google Drive
Supports team drives (fill in the directory ID of the team drive for the root directory ID)
1. Necessary Conditions
Notes
- The machine where the OpenList service is deployed must first be able to connect to Google Drive.
- The Google Drive API service must be activated. For the activation method, see Enabling the Google Drive API.
Refer to Google Workspace > Google Drive > Guide: https://developers.google.com/workspace/drive/api/quickstart/js
2. Preparation for Integration
2.1. Enabling the Google Drive API
- On the guide page, find the
Enable API
button, click to enter the quick activation interface, click Next and Confirm to complete the activation. - You can also visit the Google Drive API management interface, find the
Enable
button at the top, click and wait for the activation to complete. Quota and System Limit Management
(optional): Switch to theQuota and System Limits
tab, and set appropriate quotas and limits according to your usage and needs.
2.2. Creating an OAuth Client (optional; no need to create if using OpenList/Community server/self-hosted server)
- In the Credentials interface, click the
Create Credentials
drop-down menu, and select and clickOAuth Client ID
.
- In the pop-up window, select
Web Application
and fill in the application name. - In the
Authorized Redirect URIs
, enterhttps://api.oplist.org/googleui/callback
. If using a self-hosted or Community server, enter the corresponding domain name, such ashttps://your-domain.com/googleui/callback
. - Click the
Create
button to complete the creation of the OAuth client. Note: Please copy and save theClient ID
andClient Secret
for subsequent use.
- Add yourself as a test user. Find the
Target
menu on the left, click to enter, find the+ Add User
button underTest Users
, click and enter your Google account email address, then click Add.
- After testing, you can publish the application. Find the
Target
menu on the left, click to enter, find thePublish App
button underPublishing Status
, click and confirm to complete the app publishing.
2.3. Obtaining Access Token
and Refresh Token
- Open the OpenList Google Authorization Page ⚠️ If using a Community server/self-hosted server, visit the Community server/self-hosted server.
- In the drop-down box on the page, select
GoogleDrive Login
.
- If you created an OAuth client ID in the above steps, enter the created
Client ID
andClient Secret
in the following input boxes.
Otherwise, check ☑️ to use the API provided by OpenList. ⚠️ If using a Community server/self-hosted server, the built-in client ID and application secret of the Community server/self-hosted server are used at this time.
- Click the
Get Authorization
button, the system will jump to the Google authorization page, log in to your Google account, and authorize OpenList to access your Google Drive.
- If the prompt
This app isn't verified by Google
appears, clickAdvanced
, then clickGo to oplist.org (unsafe)
to continue. (If it is a Community server/self-hosted server, the domain name here is based on the actual Community service domain name, please carefully identify).
- Please pay attention to the permission information on the authorization page (in the red box below), ensure that it only accesses your Google Drive files. If you find that the permission in the Community service is not limited to accessing Google Drive, please raise an issue in openlistteam/docs/issues.
- After successful authorization, the system will return a
Refresh Token
andAccess Token
. Please copy and save the token for use in subsequent configurations.
3. Adding Google Drive to Alist
3.1. Configuration Instructions
3.1.1. Root Folder ID
Similar to Alibaba Cloud Drive, it is the last string in the official website URL, such as:
3.2. Starting to Add
- Open the Alist management interface and click the
Storage
menu on the left. - On the storage list page, click the
Add Storage
button in the upper right corner. - Select the driver as
Google Drive
.
- Enter the mount path, such as:
google-drive
. - Enter the root folder ID obtained above in the
Root Folder ID
. If using the root directory, enterroot
. - Enter the refresh token obtained above in the refresh token (if not obtained, please refer to Preparation for Integration ).
- If you are using the OAuth client ID and secret provided by
OpenList (or Community server/self-hosted server)
, configure according to7.1
and7.2
:
7.1. CheckUse online api
to indicate using the online API provided by OpenList.
7.2. Fill in the Api url address ashttps://api.oplist.org/googleui/renewapi
. If it is aCommunity server/self-hosted server
, enter the corresponding server address.
- If you are using your own created OAuth client ID and secret, configure according to
8.1
and8.2
:
8.1. Do not checkUse online api
to indicate using your own built OAuth client ID and secret.
8.2. Enter yourOauth Client ID
inClient ID
and yourOauth Client Secret
inClient Secret
.
- Click the
Add
button to complete the addition of Google Drive.