接下來再點擊一次「建立憑證」
類型可以選擇「電腦版應用程式」
設定名稱後點擊「建立」
平臺就會返回我們需要的用戶端ID和用戶端密碼,需要將這個記錄到本機電腦上。
最終的樣子
其他的參考:
https://rclone.org/drive/#making-your-own-client-id
Making your own client_id
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. rclone already has a high quota and I will continue to make sure it is high enough by contacting Google.
It is strongly recommended to use your own client ID as the default rclone ID is heavily used. If you have multiple services running, it is recommended to use an API key for each service. The default Google quota is 10 transactions per second so it is recommended to stay under that number as if you use more than that, it will cause rclone to rate limit and make things slower.
Here is how to create your own Google Drive client ID for rclone:
1.Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)
2.Select a project or create a new project.
3.Under "ENABLE APIS AND SERVICES" search for "Drive", and enable the "Google Drive API".
4.Click "Credentials" in the left-side panel (not "Create credentials", which opens the wizard), then "Create credentials"
5.If you already configured an "Oauth Consent Screen", then skip to the next step; if not, click on "CONFIGURE CONSENT SCREEN" button (near the top right corner of the right panel), then select "External" and click on "CREATE"; on the next screen, enter an "Application name" ("rclone" is OK); enter "User Support Email" (your own email is OK); enter "Developer Contact Email" (your own email is OK); then click on "Save" (all other data is optional). Click again on "Credentials" on the left panel to go back to the "Credentials" screen.
(PS: if you are a GSuite user, you could also select "Internal" instead of "External" above, but this will restrict API use to Google Workspace users in your organisation).
6.Click on the "+ CREATE CREDENTIALS" button at the top of the screen, then select "OAuth client ID".
7.Choose an application type of "Desktop app" and click "Create". (the default name is fine)
8.It will show you a client ID and client secret. Make a note of these.
(If you selected "External" at Step 5 continue to "Publish App" in the Steps 9 and 10. If you chose "Internal" you don't need to publish and can skip straight to Step 11.)
9.Go to "Oauth consent screen" and press "Publish App"
10.Click "OAuth consent screen", then click "PUBLISH APP" button and confirm, or add your account under "Test users".
11.Provide the noted client ID and client secret to rclone.
Be aware that, due to the "enhanced security" recently introduced by Google, you are theoretically expected to "submit your app for verification" and then wait a few weeks(!) for their response; in practice, you can go right ahead and use the client ID and client secret with rclone, the only issue will be a very scary confirmation screen shown when you connect via your browser for rclone to be able to get its token-id (but as this only happens during the remote configuration, it's not such a big deal).
(Thanks to @balazer on github for these instructions.)