Google

DAVx⁵ is not affiliated to, nor has it been authorized, sponsored or otherwise approved by Google LLC.

At the moment (June 2023), it seems to be possible to synchronize

using DAVx⁵. Tasks over CalDAV are not provided by Google.

Starting from June 6th 2023, Google has disabled their CardDAV API for every authentication method except OAuth 2.0. You will need DAVx5 4.3.4.1 or newer to choose the new OAuth based login method (see instructions below).

Synchronizing with Google accounts is not officially supported neither by DAVx⁵ nor by Google. In the past, there were server errors from time to time.

OAuth Login for Google (recommended)

Since June 2023, Google has disabled all authentication methods except OAuth for their services.

  1. Open DAVx5, choose "Create new account" (floating + button).
  2. Choose "Google Contacts / Calendar" in the login dialog.
  3. Enter your Google account (in most cases, a Gmail email address).
  4. If you enter an custom Client ID, it will override the default client ID. Normally this shouldn't be necessary.
  5. Click on "Login" and follow the instructions.
  6. If you're using a davx5-ose: As long as our DAVx⁵ OAuth login has not been "verified" by Google, you have to check "Advanced" and allow the "unsecure app" (see screenshots below: Scenario 1). If the ID is currently blocked by Google (Scenario 2) or if you use your own Client ID (Scenario 3), please follow the instructions in the screenshots.
  7. Authorize DAVx⁵ to access your Google contacts and calendars.

You should now be able to synchronize your contacts and calendars.

Contact group method: Google CardDAV does not map the "labels" from Google Contacts – so there's unfortunately no contact group (label) support. Choose "per-contact categories" as contact group method to minimize problems.

Optional: Create your own Google Client ID

DAVx⁵ uses our (DAVx5) client ID to access Google services. From Google's perspective, DAVx5 is a third-party service that asks for authentication + access to your data over Google. This is only an optional convenience feature and Google may cancel our client ID at any time. However, you can create and use your own client ID.

In order to be able to create a Google Client ID that is useable in DAVx5 to connect and use the OAuth authentication and API services of Google you need to create a cloud account following the steps below.

1. Create new project:

  • Name your project: "My DAVx5 Integration"
  • Create OAuth Consent Screen: → "External"
  • Add Project details: Fill out the form and enter App Name: "My DAVx5 app", Support Email: "your email address", Developer contact information: "your email address"
  • Now you need to enter the APIs you want to use. Click Add ScopesManually Add Scopes

https://www.googleapis.com/auth/carddav
https://www.googleapis.com/auth/calendar

  • Click: Save and continue
  • Add Users: All users that should be able to use DAVx5 within this Project need to be added here with their email addresses. At least add yourself (=your own email address).
  • Click: Back to Dashboard

0. Preparations

  • In a web browser go to console.cloud.google.com
  • Choose the free trial plan
  • Verify you're a human (for example via bank account). Nothing will be charged and the whole process and usage is free of charge! You don't need to pay for using their CalDAV and CardDAV APIs

2. Activate CalDAV/CardDAV for your project

  • Click "Enabled APIS & Services" → "Enable APIs & Services" → In the search bar search for "caldav", choose this API and click Enable. Search "CardDAV" and Enable it as well

3. Create the actual Client ID

  • Side bar: → Choose "Credentials" → "OAuth Client ID"
  • Choose "Android": Name it "My DAVx5 App"
  • Package name: "at.bitfire.davdroid", SHA1: Create a random number with for instance https://onlinehashtools.com/generate-random-sha1-hash (this will not be checked anywhere, you don't have to enter colons). Enter this string into the respective field
  • The ID is being created. Copy the Client ID and send it to your mobile phone. (You can at any time log in again and view the Client ID.) In the end you will have your own Google Client ID looking like this:

    <b989789789234-blalblal434283798724jsh87324j>.apps.googleusercontent.com

  • After obtaining your Client ID, switch from "Testing" to "Production" mode in the API & Services → OAuth Consent Screen. Otherwise your token will expire after 7 days and you need to re-authenticate in DAVx5. You don't have to actually request verification (create videos, send infos to Google etc).