wvrzel / simpleCalDAV

A simple php CalDAV-Client library. Connect, create, change, delete... easy to use
GNU General Public License v2.0
116 stars 60 forks source link

how to connect to google #10

Open daniu-de opened 8 years ago

daniu-de commented 8 years ago

Hi,

can someone tell me how to connect to a google server? What do I need to enter as server? I guess username/password is clear, but the rest does not seem to work no matter what I enter.

I tried lots of things - among them:

https://www.google.com/calendar/dav/#Google-Kalender-ID#/user https://www.google.com/calendar/dav https://apidata.googleusercontent.com/caldav/v2/useraccount@gmail.com/events

plus cutting off on the ends of these urls until there is only the server left. Some give me error messages (line 600 - IIRC: wrong variable type and one more line a bit later) with your test-script (config/listCalendars.php), sometimes it shows: "not allowed"

I can connect to a google calender by using the complete url with the calender url that google shows in the calendar list (ical-link ending on .ics) with this script: http://zeit-zu-handeln.net/2014/02/allgemein/owncloud-6-kalender-ical-feeds-importierenexportieren/ in that script you gotta just input a complete url. Strangely this calendar is not published but it is still possible to connect to it with that method.

I'd appreciate if someone could tell me how to connect to a google server with simplecaldav

regards

daniu-de commented 8 years ago

Hi,

additional info: here https://github.com/DAViCal/davical/blob/master/inc/caldav-client.php - at McMillian's underlying class (in v2 there are no samples any more) it says:

$acc["google"] = array(

but with these input I get:

Warning: Invalid argument supplied for foreach() in /[...]/caldav/CalDAVClient.php on line 600 Warning: Invalid argument supplied for foreach() in /[...]/caldav/CalDAVClient.php on line 600 Warning: Invalid argument supplied for foreach() in /[...]/caldav/CalDAVClient.php on line 600 Warning: Invalid argument supplied for foreach() in /[...]/caldav/CalDAVClient.php on line 727

it's just warnings ... but I also do not get any results

regards