CardDAV interface is now available in Google, which enables you to manage, access, and view your contacts with CardDAV protocol. Your contacts can now be stored with your account in Google. Use the Google CardDAV URL for much of this. Your client application can also utilize CardDAV API to make new contacts, query for contact in different criteria as well as delete or edit existing contacts.
Connecting on The Google CardDAV URL & server
The CardDAV protocol involves the discovery of contact resources and address book URLs. You must not hardcode URL since it can be changed anytime. Moreover, client applications need to use oAuth 2.0 authentication as well as HTTPS on the user’s account. Thus, the server will not validate a request if it doesn’t work out in HTTPS that has OAuth 2.0 authentication of account.
Additionally, your application must also register on DevConsole. If you try to connect to HTTP with basic authentication or through password/email that doesn’t match to Google account can lead to HTTP 401 Unauthorized response code. Use this information to connect to the Google CardDAV URL.
If you wish to access CardDAV, your client program must connect to discovery path through working an HTTP PROPFIND on:
If HTTP 301 was redirected to Address Book Resource, your client program could work a PROPFIND to discover DAV: current-user-principal, DAV: principal-URL as well as addressbook-home-set properties. Then, the client program will determine the principal address book by conducting a PROPFIND on the addressbook-home-set. It can also find for collection and addressbook resources.
CardDAV utilizes the concept of REST. The client applications work on its specific resources by its designed URLs.
https://www.googleapis.com/carddav/v1/principals/ userEmail/lists/default/ contactId
https://www.googleapis.com/carddav/v1/principals/ userEmail/ lists
Using CardDAV to Sync Google
Do you want to sync and setup CardDAV with Google? Then follow the following steps.
First, you must open the app Settings on your device.
Proceed to “Mail, Contacts, Calendars,” and then click it.
In the ‘Accounts’ option, click “Add Account”
Choose ‘Other’ at the bottom
In the ‘Contacts’ tab, choose “Add CardDAV account”
Enter your credentials. Since Google CardDAV URL account is used in syncing your contacts, you must fill your account with the needed credentials. Make sure that you have set ‘Server” into ‘google.com’ without quotes. You can follow this style
Username: [your Google account username] Password: [your Google account password] Description; [anything you like]
Then, choose ‘Next’ on the upper right-hand corner after you finished entering the credentials.
Your CardDAV account will be set up based on your internet connection’s speed. Your Gmail contacts will sync with your device.
Google CardDAV URL OAuth 2.0 requirement
Google’s CardDAV URL interface needs OAuth 2.0. It allows you to use OAuth 2.0 for installed applications and accessing Google APIs.
If you want to access Google CardDAV, you must always update with its URL. Thus, it changes anytime. With this, you can now have unlimited access to make changes to your contact list. You can edit or delete contacts. You can also make a query for contacts that suits to specific category. Google CardDAV can offer you with lots of features for your specific needs.