vdirsyncer icon indicating copy to clipboard operation
vdirsyncer copied to clipboard

failure using type="google_contacts" (type="google_calendar" works with same client_id, client_secret and token)

Open valpmakt opened this issue 2 years ago • 4 comments

I get the following error when trying to use the "google_contacts" type.

Note that calendar sync against the same gmail account using the same client_id, client_secret and token are working fine.

vdirsyncer -v DEBUG -c migrate-contacts-user_at_gmail.com-to-localfiles.conf discover Discovering collections for pair sync_contacts critical: Failed to initialize user_at_gmail_dot_com critical: - google_contacts storage doesn't take the parameters: type

Debian Bookworm using the distribution packaged vdirsyncer.

vdirsyncer version 0.19.0

python version Python 3.11.2

migrate-contacts-user_at_gmail.com-to-localfiles.conf:

a = "user_at_gmail_dot_com" b = "localfiles" collections = ["from a", "from b"] conflict_resolution = "a wins"

metadata = ["displayname"]

[storage user_at_gmail_dot_com] type = "google_contacts" token_file = "~/.vdirsyncer/token/user_at_gmail.com" client_id = "redacted" client_secret = "redacted"

[storage localfiles] type = "filesystem" path = "~/.vdirsyncer/archive/local-contact-replicas/user_at_gmail.com" fileext = ".vcf"

valpmakt avatar Aug 02 '23 18:08 valpmakt

I get the identical error if I use a different (empty) token file.

valpmakt avatar Aug 06 '23 16:08 valpmakt

Did you enable both APIs (caldav and carddav) in Google's console?

WhyNotHugo avatar Oct 15 '23 12:10 WhyNotHugo

On 10/15/23 05:40, Hugo wrote:

Did you enable both APIs (caldav and carddav) in Google's console?

Yes:

Google Contacts CardDAV API Google An API to synchronize contacts.

API Enabled

CalDAV API Google Enterprise API Manage calendars and events in Google Calendar using the CalDAV protocol.

API Enabled

valpmakt avatar Oct 15 '23 15:10 valpmakt

duplicate of #994

axet avatar Jan 10 '24 11:01 axet