Ok, I'm trying to do very simple queries against the Google CardDAV interface. I have a valid OAuth key, I have a valid email address. Using curl, attempting this:
curl --request REPORT \
--header "Content-Type: text/xml" \
--header "Depth: 1" \
--header "Authorization: Bearer <OAuth Key Here>" \
--data-ascii "<?xml version=\"1.0\" encoding=\"utf-8\"?> \
<D:addressbook-query xmlns:card="urn:ietf:params:xml:ns:carddav"
xmlns:cs="http://calendarserver.org/ns/" xmlns:D="DAV:"
xmlns:ical="http://apple.com/ns/ical/"> \
<card:allprop/> \
</D:addressbook-query>" \
https://www.googleapis.com/carddav/v1/principals/<Email Address Here>/lists/default
I have validated the XML, but the response I'm getting from google is:
<?xml version="1.0" encoding="UTF-8"?>
<d:error xmlns:d="DAV:"/>
It would be helpful if I knew what was in error. Any suggestions?
the namespace for the addressbook-query should be card, not DAV and the allprop should be DAV. I also found that Google CardDav requires a filter, but you can include an empty criteria and it will return all elements. See below: