0

I am trying to create a CardDAV client that is connecting to a Hostgator server. I am using the correct CardDAV url, but when I execute the request below, I get the response below.

Request

GET /addressbooks/email@example.com/contacts~430ea1-57a6-5b5e-8c68-fad1ce80def6
Authorization: Basic [insert base 64 username:password]

Response

User email@example.com is not authorized (Remote host: 54.191.45.246)
In /usr/local/cpanel/3rdparty/php/54/lib/php/Horde/Registry.php on line 1573

 1. Horde_Rpc_Webdav->getResponse() /usr/local/cpanel/base/horde/rpc.php:158
 2. Sabre\DAV\Server->exec() /usr/local/cpanel/3rdparty/php/54/lib/php/Horde/Rpc/Webdav.php:66
 3. Sabre\DAV\Server->invokeMethod() /usr/local/cpanel/3rdparty/php/54/lib/php/Sabre/DAV/Server.php:214
 4. Sabre\DAV\Server->broadcastEvent() /usr/local/cpanel/3rdparty/php/54/lib/php/Sabre/DAV/Server.php:455
 5. call_user_func_array() /usr/local/cpanel/3rdparty/php/54/lib/php/Sabre/DAV/Server.php:433
 6. Sabre\DAVACL\Plugin->beforeMethod()
 7. Sabre\DAV\ObjectTree->nodeExists() /usr/local/cpanel/3rdparty/php/54/lib/php/Sabre/DAVACL/Plugin.php:701
 8. Sabre\DAV\ObjectTree->getNodeForPath() /usr/local/cpanel/3rdparty/php/54/lib/php/Sabre/DAV/ObjectTree.php:96
 9. Sabre\DAV\ObjectTree->getNodeForPath() /usr/local/cpanel/3rdparty/php/54/lib/php/Sabre/DAV/ObjectTree.php:67
10. Sabre\DAV\Collection->getChild() /usr/local/cpanel/3rdparty/php/54/lib/php/Sabre/DAV/ObjectTree.php:64
11. Horde_Dav_RootCollection->getChildren() /usr/local/cpanel/3rdparty/php/54/lib/php/Sabre/DAV/Collection.php:33
12. Horde_Registry->hasMethod() /usr/local/cpanel/3rdparty/php/54/lib/php/Horde/Dav/RootCollection.php:85
13. Horde_Registry->_doHasSearch() /usr/local/cpanel/3rdparty/php/54/lib/php/Horde/Registry.php:1011
14. Horde_Registry_Api->methods() /usr/local/cpanel/3rdparty/php/54/lib/php/Horde/Registry.php:1060
15. Ingo_Api->disabled() /usr/local/cpanel/3rdparty/php/54/lib/php/Horde/Registry/Api.php:86
16. Horde_Registry->pushApp() /usr/local/cpanel/base/horde/ingo/lib/Api.php:33

====================

I hope this isn't a bad question. I am fairly new to this community.

Andrew Wilson
  • 68
  • 1
  • 9
  • 1
    Looks like your authentication is wrong? Another guess is that you may need to URL-escape the @ and the ~ (I think it shouldn't be necessary but some software expects it). And if it is a CardDAV endpoint, you wouldn't send a GET, but a PROPFIND. This is a great intro to writing CardDAV clients: [Building a CardDAV client](http://sabre.io/dav/building-a-carddav-client/). – hnh Jan 29 '17 at 12:35
  • @hnh Thank you for your help however I tried both ideas and neither one worked. Do you have any other suggestions? – Andrew Wilson Jan 29 '17 at 20:47
  • No, I guess it is a little hard to debug the issue w/o access. Though I guess the response of the server is pretty clear ;-> – hnh Jan 29 '17 at 20:50
  • @hnh Yeah. Authorized almost sounds like a permissions problem. When I go to the CardDAV from a browser it works fine. Just not telnet. – Andrew Wilson Jan 29 '17 at 20:51

0 Answers0