pimutils / vdirsyncer

📇 Synchronize calendars and contacts.
https://vdirsyncer.pimutils.org/
Other
1.57k stars 163 forks source link

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

Open valpmakt opened 1 year ago

valpmakt commented 1 year ago

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 commented 1 year ago

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

WhyNotHugo commented 1 year ago

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

valpmakt commented 1 year ago

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
axet commented 10 months ago

duplicate of #994