Google CardDAV API - getting users addressbook

452 views Asked by At

Trying to use the Google CardDAV API to get at user's address books under my account. I have successfully gathered the base info for the principal user (PROPFIND current-user-principal), and the Home Set and addressbook of the principal, as defined in the Google CardDAV API document. I have users within the principal account, and I want to get the addressbook of those users. The documentation, and what info I have managed to wring out of the RFCs, suggests that I might use:

curl --request PROPFIND  \
     --header "Content-Type: text/xml"  \
     --header "Depth: 1" \
     --header "Authorization: Bearer ya29.wwAiN8Xex0IrvCJx5_zRgB1RdO5iFeH7cyYzpU_3aPRZIDi9Q5j1mSmzk9IqqcbwIWEnJijNPOqysOnDqTpt7Ie6Ef9b7WrBLVDCTuNKfhjA2m6m7w604CDm" \
     --data-ascii "<?xml version=\"1.0\" encoding=\"utf-8\"?> \
                       <D:propfind xmlns:D=\"DAV:\"> \
                         <D:prop> \
                           <D:current-user-principal /> \
                           <D:principal-URL /> \
                           <D:resourcetype /> \ 
                         </D:prop> \
                       </D:propfind>" \
https://www.googleapis.com/carddav/v1/principals/<USER EMAIL>/lists/default

But that gives me:

<?xml version="1.0" encoding="UTF-8"?>
<errors xmlns="http://schemas.google.com/g/2005">
  <error>
    <domain>GData</domain>
    <code>notFound</code>
    <internalReason>Not Found</internalReason>
  </error>
</errors>

Thoughts?

thanks, Andy

0

There are 0 answers