Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with CardDAV server of Google #13

Open
Symnok opened this issue Jul 24, 2022 · 1 comment
Open

Problem with CardDAV server of Google #13

Symnok opened this issue Jul 24, 2022 · 1 comment

Comments

@Symnok
Copy link

Symnok commented Jul 24, 2022

Google has its own CardDAV server that does not require OAUTH2 authentication.

Login: [email protected] (your Gmail email address)

Password: Application specific password (not your Google main password) that can be generated from within security settings of Google Account. You need to enable 2FA first to generate this password.

CardDAV URL: https://www.google.com/carddav/v1/principals/[email protected]/lists/default/
where [email protected] your Gmail email address

This settings can be used for accessing Google contacts on PC using standard Mail and Calendar program, on Android (using DAVx5 app), on iPhone (using built-in CardDAV client) and even on Windows 10 Mobile devices.

In all cases, no OAUTH2 Authentication required.

Unfortunately, carddav-util does not work with this server:

symnok@myserver:~/carddav-util$ python3 ./carddav-util.py --download [email protected] --passwd=abcd1234defg5678 --file=test.vcf --url=https://www.google.com/carddav/v1/principals/[email protected]/lists/default/
Response:

[i] Downloading from https://www.google.com/carddav/v1/principals/[email protected]/lists/default/ to test.vcf ...
[i] Downloading the addressbook...
[!] Error code: 400
b'{\n "error": {\n "code": 400,\n "message": "Request contains an invalid argument.",\n "status": "INVALID_ARGUMENT"\n }\n}\n'

Login and password are correct because when I use incorrect password I get

[i] Downloading the addressbook... [!] Error code: 401 b'{\n "error": {\n "code": 401,\n "message": "Invalid Credentials",\n "status": "UNAUTHENTICATED"\n }\n}\n'

@ljanyst
Copy link
Owner

ljanyst commented Jul 27, 2022

I can't help you of the top of my head and don't have the time to investigate at the moment. You seem to have enough skill to figure it out yourself. I'd be happy to accept a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants