You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Supports Team Drive (Enter the Team Drive directory ID for the Root Folder ID)
19
+
20
+
:::
21
+
22
+
::: zh-CN
23
+
14
24
官网:https://drive.google.com/
15
25
16
26
- 支持团队盘(根目录ID填写团队盘的目录ID)
17
27
18
-
## 1. 必要条件
28
+
:::
29
+
30
+
## 1. Prerequisites { lang="en" }
31
+
32
+
## 1. 必要条件 { lang="zh-CN" }
33
+
34
+
::: en
35
+
36
+
1. The machine on which the OpenList service is deployed must be able to connect to Google Drive.
37
+
38
+
2. The Google Drive API service must be enabled. For details on how to enable it, please refer to [Enabling the Google Drive API](#_2-1-enable-google-drive-api).
39
+
40
+
> For detailed steps, see [Google Workspace > Google Drive > Quick Start Guide](https://developers.google.com/workspace/drive/api/quickstart/js).
41
+
42
+
:::
43
+
::: zh-CN
19
44
20
45
1. 搭建 OpenList 服务的机器必须能够连接到 Google 网盘。
21
46
22
47
2. 必须启用 Google 云盘 API 服务,具体启用方式请参考 [启用 Google Drive API](#21-启用-google-drive-api-的-api)。
23
48
24
49
> 详细步骤可参考 [Google Workspace > Google Drive > 快速入门指南](https://developers.google.com/workspace/drive/api/quickstart/js)
25
50
26
-
## 2. 准备接入
51
+
:::
52
+
53
+
## 2. Preparation { lang="en" }
54
+
55
+
## 2. 准备接入 { lang="zh-CN" }
56
+
57
+
### 2.1. Enable Google Drive API { lang="en" }
58
+
59
+
### 2.1. 启用 Google Drive API 的 API { lang="zh-CN" }
60
+
61
+
::: en
62
+
63
+
1. On the [Guide Page](https://developers.google.com/workspace/drive/api/quickstart/js), locate the `Enable the API` button and click to proceed to the quick activation interface. Follow the instructions and confirm the settings to complete the activation process.
27
64
28
-
### 2.1. 启用 Google Drive API 的 API
65
+
2. You can also visit the [Google Drive API Management Interface](https://console.cloud.google.com/apis/library/drive.googleapis.com). Find the `Enable` button at the top and click it; wait for the activation to complete.
66
+
67
+
3.`Quotas and System Limits Management`(optional): Switch to the `Quotas and System Limits` tab and set appropriate quotas and limits based on your usage and requirements.
1. On the [Credentials Page](https://console.cloud.google.com/apis/credentials?hl=en), click the `Create Credentials` dropdown menu and select and click `OAuth client ID`.
87
+
> If prompted with `To create an OAuth client ID, you must first configure the consent screen`, click the `Configure consent screen` button, and complete the creation of the `Brand Information` on the subsequent page, selecting `External` for the `Audience`. After completion, return to the Credentials page to continue creating the OAuth client ID.
2. In the pop-up window, select `Web Application` and enter the name of your application type.
90
+
3. For the `Authorized redirect URIs`, enter `https://api.oplist.org/googleui/callback`. If you are using a self-built service or a non-profit organization, please enter the corresponding domain name, for example, `https://your-domain.com/googleui/callback`.
91
+
4. Click the `Create` button to complete the creation of the OAuth client. Note: Make sure to copy and save the `Client ID` and `Client Secret`; you will need them later on.
5. Add yourself as a test user: On the left side, find the `Audience` menu and click to enter it. Then, locate `Test Users` and click the `+ Add users` button. Enter your Google account email address and click `Save`.
6. After completing the testing, you can publish your application: On the left side, find the `Audience` menu and click to enter it. Then, locate `Publication Status` and click the `Publish app` button. Confirm the publication to complete the application release process.
### 2.3. Get `Access Token` and `Refresh Token` { lang="en" }
131
+
132
+
### 2.3. 获取`访问密钥`和`刷新密钥` { lang="zh-CN" }
133
+
134
+
::: en
57
135
58
-
### 2.3. 获取`访问密钥`和`刷新密钥`
136
+
1. Open the [OpenList Google Authorization Page](https://api.oplist.org/). **⚠️ If you are using a public or self-hosted server, please proceed with that server.**
137
+
138
+
2. In the dropdown menu on the page, select `GoogleDrive Login`.
Otherwise, check the box ☑️ to use the API provided by OpenList. **⚠️ If you are using a public or self-hosted server, the built-in Client ID and Client Secrets of that server will be used.**
4. Click the `Get Authorization` button. The system will redirect you to the Google Authorization page. Log in to your Google account and authorize OpenList to access your Google Drive.
154
+
155
+

156
+
157
+
5. If a message appears stating `This app has not been verified by Google`, click `Advanced` and then click `Go to oplist.org (insecure)` to continue. (If you are using a public or self-hosted server, the domain name here should match the actual domain name of the service; please verify this carefully.)
158
+
159
+

160
+
161
+
6. Pay attention to the permission information on the authorization page (within the red box in the image below). Make sure that the permission granted is only for accessing your Google Drive files. If you find that the permission includes access to something other than just your Google Drive files in the public service, please report an issue at [OpenListTeam/OpenList-Docs/issues](https://github.com/OpenListTeam/OpenList-Docs/issues).
162
+
163
+

164
+
165
+
7. After authorization is successful, the system will provide you with a `Refresh Token` and an `Access Token`. Please copy and save these tokens, as they will be used in subsequent configurations.
4. Enter the mount path, for example: `google-drive`.
252
+
253
+
5. In the `Root Folder ID` field, enter the root folder ID obtained earlier; if you are using the root directory, enter `root`.
254
+
255
+
6. In the `Refresh Token` field, enter the refresh token obtained earlier (if not available, refer to [Preparing for Integration](#_2-preparation).
256
+
257
+
7. If you are using the OAuth client ID and key provided by OpenList (or a public welfare server/self-built server), follow steps 7.1 and 7.2:
258
+
259
+
7.1. Check the `Use online API` option to indicate that you want to use the online API provided by OpenList.
260
+
261
+
7.2. Enter `https://api.oplist.org/googleui/renewapi` as the API URL; if it’s a public welfare server/self-built server, enter the corresponding server address.
0 commit comments