Google Calendar can't subscribe to icalendar feed over https?
Asked Answered
G

7

8

Would someone happen to know if Google Calendar has some problems subscribing to iCalendar feeds served on a secure https-address?

I'm developing a website running on an https-address that has an iCalendar feed that users can subscribe to. The feed works just fine in Outlook and iCal, but not in Google Calendar. When a user attempts to subscribe to the feed, they get the error message "Could not fetch the URL".

I suspected that there was something wrong with the feed or the generated iCalendar data, so I ran the .ics file produced through a number of validators, and they were fine. To rule out an error in the feed itself, I put the generated .ics file on the server, to see if a static file would work, and that failed in Google Calendar as well. Then I put the file on a completely different server behind a non-secure (http) url, and that worked!

So I'm beginning to suspect that httpS is the problem. The server's certificate is valid, so that shouldn't be causing any trouble. Besides, the validators could access the feed (and the static file) just fine.

This google groups discussion indicates that others are having similar suspicions: http://productforums.google.com/forum/#!topic/calendar/61-eUd-fyrg

Problem is, the site HAS to run on over https, so I can't just switch to http to make the feed work.

So, if anyone has any information confirming or contradicing my theory, or any ideas about what else might be causing these problems, I would greatly appreciate it.

Glutamine answered 10/10, 2012 at 17:7 Comment(1)
Is there any compatibility issue with outlook.office365.com? I seem to getting the "Could not fetch the URL" error from Google whenever I enter in Outlook address that ends in .icsHiggler
G
8

Google has confirmed that it really is an issue with HTTPS, i.e. Google Calendar is unable to subscribe to iCalendar feeds from external encrypted (https) URLs.

My employer has an enterprise account with Google, and we filed a support request with google's enterprise support, with example feeds and our own assesment of the problem.

Today, we finally got a proper answer, confirming our initial analysis and informing us that the correct techincal team has been notified and an internal feature request (for supporting feed from https-urls) has been opened.

We were not given any timeframe for the fix, but I requested that they get back to us when the issue has been resolved. I will add that information to this answer once I receive it.

Glutamine answered 5/11, 2012 at 10:38 Comment(3)
Can't get it to work with HTTP. I can download the .ics file just fine with the URL, but Google fails to import it.Individuate
it remains true on Tuesday, 8 NovWaddle
Still not fixed, works with http and webcal but no httpsPassivism
A
11

I can confirm that (today) Google Calendar can successfully subscribe to an HTTPS iCal feed.

You can test this yourself by adding this URL: https://events.stanford.edu/byCategory/2/eventlist.ics

To be extra sure I also did another test of giving it an HTTPS url that didn't also work if you replace the https -> http. That was also fine, so in all cases, HTTPS should work.

What doesn't work in my tests is:

  • HTTP Authentication (https://myusername:[email protected]/) - I got "Could not fetch URL" - but that's not what this question is asking.
  • Any URL over 256 characters. However, using a link shortener (e.g., goo.gl) works around this issue.
Arrive answered 22/3, 2013 at 0:42 Comment(6)
Using a URL shortener fixed it for meCharmine
This may have worked in the past, but currently Google Calendar actually seems to load the content over HTTP even if the URL is HTTPS. So if you still have an example where a "pure" https URL works, I'd be curious to see it.Ethiopic
@Ethiopic it definitely still works. Our product (Close.io) only loads over HTTPS and syncing via iCal feeds still works.Arrive
@Arrive OK, thanks for letting me know. I now see that my iCal link is still now working even though it is served over both HTTP and HTTPS, so the problem must be elsewhere.Ethiopic
Just to wrap this up for future readers: It turned out that my bug was caused by Google Calendar sending a "wrong" Accept header. Where other calendars send 'text/calendar' as described here, Google Calendar sent a type that was read by my Rails app as HTML (maybe text/html, I'm not sure).Ethiopic
For me, even 150 character length from Outlook Office365 did not import correctly. Using goo.gl or tinyurl.com fixed it for me as well.Higgler
G
8

Google has confirmed that it really is an issue with HTTPS, i.e. Google Calendar is unable to subscribe to iCalendar feeds from external encrypted (https) URLs.

My employer has an enterprise account with Google, and we filed a support request with google's enterprise support, with example feeds and our own assesment of the problem.

Today, we finally got a proper answer, confirming our initial analysis and informing us that the correct techincal team has been notified and an internal feature request (for supporting feed from https-urls) has been opened.

We were not given any timeframe for the fix, but I requested that they get back to us when the issue has been resolved. I will add that information to this answer once I receive it.

Glutamine answered 5/11, 2012 at 10:38 Comment(3)
Can't get it to work with HTTP. I can download the .ics file just fine with the URL, but Google fails to import it.Individuate
it remains true on Tuesday, 8 NovWaddle
Still not fixed, works with http and webcal but no httpsPassivism
F
2

I've been working on creating my own iCal subscription system from scratch and wanted to share something I learned this week, ten years after the start of this discussion.

Like discussed above, importing via URL accepts https:// just fine.

But when creating an "Add to Calendar" URL for Google Calendar I discovered that they still won't accept https:// links.

The "Add to Calendar" URL formula is:

https://calendar.google.com/calendar/u/0/r?pli=1&cid=<iCal-URL-Here>

Some examples to make it clear:

// https will not work:
https://calendar.google.com/calendar/u/0/r?pli=1&cid=https://example.com/ical.ics

// http will work:
https://calendar.google.com/calendar/u/0/r?pli=1&cid=http://example.com/ical.ics

// You may also try using the webcal protocol:
https://calendar.google.com/calendar/u/0/r?pli=1&cid=webcal://example.com/ical.ics

Your mileage may vary depending on your host's handling of unsecured requests. I welcome anyone who runs into trouble to leave a comment.

Before I part, another friendly tip: You need to URI encode your iCal URL when using this import URL.

So, in reality, your link would be:

https://calendar.google.com/calendar/u/0/r?pli=1&cid=http%3A%2F%2Fexample.com%2Fical.ics

In JavaScript, use encodeURIComponent().

Forerunner answered 21/8, 2022 at 21:22 Comment(1)
Indeed, it doesn't work over http(s), but just http. I can confirm that behavior as Today, Tuesday 8 Nov, I ran into this issue while fixing a bug in our iCal generator.Waddle
C
1

The issue we've found in our case is that Google Calendar currently ignores the HTTPS indication in the URL and accesses via HTTP instead. If your HTTP requests redirect to HTTPS or just serve up the content over HTTP, then it will work. If you have a firewall blocking port 80, then things hang and its game over.

TL;DR: If your URL works with http in addtion to https, then it will work with Google Calendar when you enter it as https. (That assumes robots.txt does not restrict access.) Otherwise, it will fail.

Clutter answered 6/3, 2014 at 17:34 Comment(0)
M
1

As of January 2020 the problem appears to be resolved - Google Calendar does not appear to have problems subscribing to and updating valid RFC5545 calendars. The icalender.org validator works well and can test both a file and a link (subscription).

Mitch answered 11/1, 2020 at 23:39 Comment(0)
D
0

if the server has a robots.txt blocking google, this was a cause for failure with google calendar for me too. So, have you tried looking at the robots.txt of your https server?

This being said, is not a limitation of google calendar + https as google calendar provides https for its on "private address" for .ics files and thereof it can also accept https from google.com (though this is only one configuration over many other possible).

Dingbat answered 15/10, 2012 at 17:40 Comment(0)
I
0

I have had a lot of difficulties with this:

It was frustrating because a downloaded file would open in Google Calendar or iCal, but it would not load as feed in either. I would get these errors in Google Calendar when I did add by URL: "Failed to import calendar from" (sitename) or "Could not fetch the URL."

Here's what I had to do:

Have duration or endtime for events, NOT BOTH.

I also had to remove this from the header: content-disposition: attachment; filename=Schedule.ics;

Also, to check if it's valid, Google ical validator.

Incoherent answered 26/1, 2014 at 9:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.