Make your own ClientID for Google Drive sync on KDE - This works!
THIS IS FOR KDE and RCLONE ONLY
In my experience so far, KDE is the only shell that is incapable of connecting to Google Drive. This isn't really the KDE dev team's fault. The guide I've written here is based on the guide that RClone gave for connecting RClone to Google Drive using your own ClientID.
You can use this for other desktop shells and sync apps, but I haven't tried and have no idea how they work.
Sources
RClone.org — Making your own client ID — main useful guide
KDE Online Accounts - Not Signing In — chatty discussion about the bug, mostly unhelpful but could help you to understand the issue better
Steps
If you've already tried to log in to your Google account in KDE, delete the account from the Online Accounts.
We're going to modify the connection parameters, so you'll need to connect your account afresh.
Moreover, it appears that KDE's Online Accounts only allows for one Google account connection, which seems a bit odd but whatever.
Log in to the Google API Console
Here: https://console.developers.google.com/
Any account is fine, doesn't need to be the same one as the Drive account you want to access.
Go to the APIs & Services dashboard
why but the APIs link wasn't visible anywhere.
Click here to go to the dashboard: https://console.cloud.google.com/apis/dashboard
Then click "Enable APIs and services" at the top,
OR click here to go directly to the API Library:
Create the OAuth Consent Screen
Go to the OAuth Consent Screen in the sidebar menu, or click this button:
Click the Get started button:

a) App Information
Type a name for the app. This doesn't really matter because only you are going to see this, when you log in to your Google account through KDE.

Add your email address by just clicking in the box. You can only choose your address.
Click Next.
b) Audience
Choose Internal or External.
I don't think this matters too much, because Internal means that only you (and your organisation, if you have Google Workspace) can access it; and External means that people can only use it if you've added them to the list of test users. Others won't be able to use it unless you have "verified" your app, which is hard so no worries there. Regardless, even if others can use it, they'll still only be connecting to their Google account.

NOTE
"Internal" is the better choice as long as the Google Drive you want to connect to is part of the same Google Workspace as this Cloud project. If you are an individual Google account user then this is fine.
"External" will require you to either:
a) publish the project, which is a lengthy, complicated and arduous process, with a bunch of verification hoops, awaiting a Google employee to verify your project;
b) keep the project in "testing" mode, which will expire after 1 week so you'll have to keep logging in to your Google account in KDE once a week.
Choose Internal.
​c) Contact Information
Just add your email address here.

d) Finish and Create
Check the "I agree" box, click Continue, then click Create.

Data Access — add scopes
Click Data access in the sidebar or click this button:
Remember to check that you're in the right project if you have more than one.
Now you have to add "scopes" — these are aspects of the data in your Google account that you want to access. For security, the Google Cloud API only allows access to the aspects of your data that have been explicitly defined and requested.
Click the Add or remove scopes button.

There are around 250 available scopes in this list, so do use the Filter at the top of the table if necessary.

In this filter box, search for each of these scope names:
userinfo.email
userinfo.profile
docs
drive
drive.metadata.readonly
You may add more if you think they are necessary.
CLICK THE BLUE UPDATE BUTTON!!!
For some reason it is possible to click outside of the popup scope panel and it will close automatically, losing all the changes that you made. So click that UPDATE button!

Finally click the blue Save button.

Add yourself as a user
Click Audience in the sidebar, or click this button:

Scroll down to Test users and click + Add users.

Add your Google account email address (the one that you type when you sign in to your Google account) and click Save.
Only Google accounts listed in here will be able to sign in using the ClientID that we're creating.
Create OAuth client
Go to the Overview in the sidebar, then click Create OAuth client in the Metrics section; or click this button to go there directly:
Choose Desktop app as application type, and give it a name (or keep the default, it doesn't matter — this is only for you to identify it in your Cloud projects console).

A panel will appear, THIS IS VERY IMPORTANT!
"OAuth client created"
Here, you must Download JSON to save your Client ID and Client Secret because if you don't, you will not be able to access your Client Secret again!!! (However, I actually was able to. But Google are liable to change anything at any time so download it!)

After download the JSON file and saving it somewhere safe, copy and paste the ID and the Secret somewhere handy because you're about to use these in a configuration file on your computer.
Back up your Google.Provider file
HERE BE DRAGONS
But only there be dragons if you don't make backups of the files we edit, so
simple solution:
make backups.
Go to /usr/share/accounts/providers/
in your file browser. I recommend Dolphin because it handles root/superuser access like a boss, instead of the class clown Gnome Files.
/usr/share/accounts/providers/
Right click on the kde
folder and click "open as adminstrator".
(You can also just press Ctrl+Alt+Shift+A to switch to adminstrator mode!)

Inside the kde
folder, right click on the file google.provider
and choose Duplicate here, or press Ctrl+D.

Rename the backup version to whatever you want so that you remember what it is.
Now open the google.provider file in a text editor. Or you can do all this through command line, but there's a lot of copying and pasting of messy strings of characters so I prefer a GUI.
I recommend Kate text editor because, again, it actually handles root/superuser requests properly, unlike the Gnome counterpart.
POTENTIALLY OUTDATED
I wrote this guide in October 2025, so proceed from here with caution.
There are two ways you can go:
Copy and paste the whole file, and add your client ID and secret.
Edit the file contents manually.
Option 2 is better if you are reading this from the distant future. (In the Linux world, things change very fast so that could be any time after October 2025 🙃).
Put the ClientID into your system
Option 1: Copy and paste the whole file
<?xml version="1.0" encoding="UTF-8"?>
<provider id="google">
<name>Google</name>
<description>NAME configured this - Sync calendars, contacts, and tasks, and upload videos to YouTube in supported apps</description>
<icon>im-google</icon>
<translations>kaccounts-providers</translations>
<domains>.*google\.com</domains>
<template>
<group name="auth">
<setting name="method">oauth2</setting>
<setting name="mechanism">web_server</setting>
<group name="oauth2">
<group name="web_server">
<setting name="Host">accounts.google.com</setting>
<setting name="AuthPath">o/oauth2/auth?access_type=offline&approval_prompt=force</setting>
<setting name="TokenPath">o/oauth2/token</setting>
<setting name="RedirectUri">http://localhost/oauth2callback</setting>
<setting name="ResponseType">code</setting>
<setting type="as" name="Scope">[
'https://www.googleapis.com/auth/userinfo.email',
'https://www.googleapis.com/auth/userinfo.profile',
'https://www.googleapis.com/auth/calendar',
'https://www.googleapis.com/auth/tasks',
'https://www.google.com/m8/feeds/',
'https://www.googleapis.com/auth/youtube.upload',
'https://www.googleapis.com/auth/docs',
'https://www.googleapis.com/auth/drive',
'https://www.googleapis.com/auth/drive.metadata.readonly'
]</setting>
<setting type="as" name="AllowedSchemes">['https']</setting>
<setting name="ClientId">CLIENT_ID_HERE</setting>
<setting name="ClientSecret">CLIENT_SECRET_HERE</setting>
</group>
</group>
</group>
</template>
</provider>
1. Copy and paste the above block, and replace the following with your own:
NAME = put your name here. This will appear in the Add Accounts panel when you add your Google account.
CLIENT_ID_HERE = paste your Client ID. No quote marks around it.
CLIENT_SECRET_HERE = paste your Client Secret. No quote marks around it.
2. Save the file.
Option 2: Edit the file manually
1. In the section <setting type="as" name="Scope">
, add the following URLs if they aren't already there:
https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/userinfo.profile
https://www.googleapis.com/auth/docs
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.metadata.readonly
Ensure that each is wrapped with a quote mark '
, and that every line is ended with a comma ,
except for the last line.
2. Replace the ClientID with yours in the tag <setting name="ClientId">
.
3. Replace the Client Secret with yours in the tag <setting name="ClientSecret">
.
4. Edit the <description> tag so that you can see it in the Add accounts panel in KDE.
5. Save the file.
Add your Google account to KDE's Online Accounts
The shortest route to do this is:
Open Dolphin
Click Network in the sidebar
Click Google Drive in the main panel
Click + Add Account... in the Online Accounts window that appears

Choose your Google service from the list.
If you kept both google.provider
files with the .provider
file suffix, then both of them will show up in the add accounts list. You can't do this, because the .provider
file MUST be called google.provider
exactly, with no additional characters whatsoever. The process appears to work, but the end result is that you log in but can't actually access anything from your Google account. I have no idea why this is but I can only assume it's something hard-coded into the KDE online accounts backend/service.
Your customised file must be called google.provider
.
I've kept the following screenshot so that you can see where your edited strings will appear.

Here you will see the name of your app that you typed in Step 6:

Sign in, choose your account, etc.
If you opted for the "External" audience type, and you haven't had your app verified (of course you haven't, it's a crazy process), you will be greeted with this scary screen.
Presumably you trust yourself, and you've been following along with this whole process, so you should understand that there aren't any risks here — you are simply connecting to your own Google account.
Click Advanced in the window, then click on the tiniest text, "Go to APP NAME (unsafe)":

You'll notice that this list is a list of the scopes that we added as scope URLs in the Data Access section (Step 7) and the google.provider
file on your computer.
Check the box next to Select all.

Finally, in your online accounts settings, click on your new account and you should see this:

Open the Network item from the sidebar in Dolphin again, choose Google Drive, and you should see your account there.
Open it and.. wait...
And you should see this:

Congratulations! You have successfully set up your very own Google Drive Sync system.
And hopefully you learned a bunch about a bunch along the way. 🥳
Last updated