17

Google announced that from March 15 2021 for the open-source version of Google Chrome, Chromium, it is limiting Private API availability.

The main implication of this change is that is no longer possible to sync Chromium bookmarks, tabs, etc. with a Google Account.

On i.a. Arch Linux, Chromium can be installed from the repositories, whereas Chrome can only be installed from the Arch User Repository (a more roundabout way).

Is there a way to re-enable the syncing of a Google Account in Chromium?

Bastiaan Quast
  • 2,802
  • 1
  • 24
  • 50

3 Answers3

20

Launching Chromium with flags setting a oauth2 ID and secret can re-enable the syncing of Chromium with a Google Account.

The oauth2-client-id should be set to: 77185425430.apps.googleusercontent.com The corresponding oauth2-secret should be set to: OTJgUOQcT7lO7GsGZq2G4IlT

E.g. on Arch Linux this can be done by creating the file ~/.config/chromium-flags.conf with the contents:

--oauth2-client-id=77185425430.apps.googleusercontent.com
--oauth2-client-secret=OTJgUOQcT7lO7GsGZq2G4IlT

It should be noted that Google recommends against doing this. It is also not clear for how long this workaround will work.

Edit: I recently came in posession of a system on which I only managed to install Ubuntu. On Ubuntu it worked by passing the flags directly in the command. That should work on any OS.

Still working as of June 2023 (Chromium 114)

Bastiaan Quast
  • 2,802
  • 1
  • 24
  • 50
  • 1
    after doing that, the browser is restarted? – Marlon López Jul 07 '21 at 22:24
  • Yes, restart it completely, reboot might be easiest way to do it – Bastiaan Quast Jul 08 '21 at 16:40
  • Using this `~/.config/chromium-flags.conf` doesn't seem to allow me to re-sync with my Google account. I guess this workaround has stopped working?! (I'm using v92.0.4515.131.) – sjakobi Aug 11 '21 at 11:00
  • @sjakobi for me it still works. Chromium 92 (on 2 devices). Did you restart? – Bastiaan Quast Aug 20 '21 at 13:30
  • Have anyone tried this on Windows 10? – nephewtom Oct 07 '21 at 23:07
  • 2
    It looks like this id and secret come from sourcecode : https://chromium.googlesource.com/experimental/chromium/src/+/b08bf82b0df37d15a822b478e23ce633616ed959/google_apis/google_api_keys.cc – Grzegorz Wierzowiecki Jan 03 '22 at 17:42
  • Unfortunately doesn't work (anymore) with version 98.0.4758.9 on Ubuntu 20.04, KDE neon 5.24. – Sadi Feb 12 '22 at 16:39
  • Does this still work for anyone else? – dan carter Mar 30 '22 at 08:57
  • 1
    It does for me. – Bastiaan Quast Mar 31 '22 at 14:35
  • 2
    A warning to anyone who does this, Google doesn't seem to understand what the term **sync** means. I expected newer data to overwrite older stuff stored in my account... but nope. Passwords that I had updated since sync was disabled were not overwritten. Not sure what else was broken because that was an immediate deal-breaker. Good thing I made a backup of `~/.config/chromium/` first. – Besworks Jun 17 '22 at 00:05
  • It worked for me only once I also created an apikeys file in /etc/chromium.d including the API keys assigned by Google to Debian (for Raspberry Pi 4 model B), see here: https://forums.raspberrypi.com/viewtopic.php?t=334758&hilit=chrome+sync – jhagege Mar 24 '23 at 06:00
  • I just happen to have done this yesterday for the first time in Ubuntu, just passing the flags in the command – Bastiaan Quast Mar 25 '23 at 13:23
  • 1
    Great answer thanks! - works on Manjaro. – pgharron May 11 '23 at 21:17
  • I was able to get it work as Bastiaan Quast suggested to pass on command line on debian. did not work with putting in file. – Miten May 29 '23 at 14:11
3

This solution works for me on Windows 10/11 latest Chromium ver. 111.0.5534.0. I was able to sync my account and use all Google services (sync, safebrowsing, voice search, etc):

https://gist.github.com/cvan/44a6d60457b20133191bd7b104f9dcc4


  1. Download Chromium.

  2. You'll notice a yellow disclaimer message appear as a doorhanger: Google API Keys are missing. Some functionality of Chromium will be disabled. Learn More.

  3. Clicking on that link takes you to the confusing API Keys docs page.

  4. If you aren't already, subscribe to the chromium-dev@chromium.org mailing list. (You can just subscribe to the list and choose to not receive any mail. FYI: the Chromium project restricts the APIs to those subscribed to that group - that is, Chromium devs.)

  5. Make sure you are logged in with the Google account associated with the email address that you used to subscribe to chromium-dev.

  6. Log in to the Google Cloud Platform, and select an existing project or press the "Create Project" button.

  7. From the project's API Manager, select the Credentials tab in the sidebar.

  8. Create a Browser API Key.

  9. You'll see a modal with an API key. Copy and paste that somewhere.

  10. Now create an OAuth Client ID.

  11. After you complete all the steps and the "content screen," you'll be presented with a modal with your Google Client ID and Client Secret.

  12. You'll need to set three environment variables:

On Windows: Launch cmd.exe and enter the following commands:

setx GOOGLE_API_KEY your_key_goes_here
setx GOOGLE_DEFAULT_CLIENT_ID your_client_id_goes_here
setx GOOGLE_DEFAULT_CLIENT_SECRET your_client_secret_goes_here

On Mac OS X / Linux: Plop these in your ~/.profile file:

export GOOGLE_API_KEY="your_key_goes_here"
export GOOGLE_DEFAULT_CLIENT_ID="your_client_id_goes_here"
export GOOGLE_DEFAULT_CLIENT_SECRET="your_client_secret_goes_here"
  1. Now launch Chromium:

On Windows: Launch Chromium normally.

On Mac OS X:

/Applications/Chromium.app/Contents/MacOS/Chromium
Svendy1126
  • 77
  • 1
  • 8
1

I was looking for syncing Chromium with Google, and I did find another process in the past, but having problems finding it again, as I didn't bookmark it or can't find it in my bookmarks. It involves logging into google, via browser, and adding Chromium in some list to allow it to sync. I guess it is like when you add apps to your account from websites. The problem is, I don't remember where to go to do this and what steps were involved.

Anyway, I just added(Aug-2021) these switches listed on this page to the latest portable chromium 61.0.3153.0 (Official Build) (64-bit), and it worked, which was a lot easier then having to log into Google and add chromium as some kind of permitted app.

Guest101
  • 11
  • 2