Google-calendar – How to find the subscribe URL from the Google Calendar embed source code

embedgoogle-calendar

If I have the embed HTML for a Google Calendar, can I extract the URL I would use to subscribe to the calendar?

For example:

Embed code (linebreaks added for clarity):

<html>
<iframe src="https://www.google.com/calendar/hosted/example.com/embed?
             height=600&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;
             src=example.com_ecafa7el7kc4du1ervkdff4x6a%40
             group.calendar.google.com&amp;color=%23AB8B00&amp;
             ctz=Pacific%2FApia"
        style=" border-width:0 " width="800" 
        height="600" frameborder="0" scrolling="no">
</iframe>
</html>

the juicy bit is src=example.com_ecafa7el7kc4du1ervkdff4x6a%40group.calendar.google.com but I can't seem to get it into a format I can use in Add -> Add by URL in my Google Calendar.

Best Answer

Given the following URL:

www.google.com/calendar/hosted/example.com/embed?height=600&wkst=1&bgcolor=%23FFFFFF&src=example.com_ecafa7el7kc4du1ervkdff4x6a%40group.calendar.google.com&color=%23AB8B00&ctz=Pacific%2FApia

You want to place the bold part in one of these templates:

XML: http://www.google.com/calendar/feeds/HERE/public/basic
ICAL: http://www.google.com/calendar/ical/HERE/public/basic.ics
HTML: http://www.google.com/calendar/hosted/HERE/embed?src=HERE

instead of the word HERE.

For example, if you wanted to use XML, use:

http://www.google.com/calendar/feeds/example.com_ecafa7el7kc4du1ervkdff4x6a%40group.calendar.google.com/public/basic

This requires the calendar to be public, which I assume it is, since there is an embeded version of it available.