Calendar subscription URLs for external calendar apps

We’ve added a new Calendar tab to user preferences that lets you subscribe to Discourse feeds in external calendar apps like Google Calendar, Apple Calendar, and Microsoft Outlook.

:down_arrow:

How it works

Navigate to your Preferences → Calendar tab and click Generate Subscription URLs. You’ll get one-click subscribe buttons for:

  • Google Calendar — opens Google Calendar with the feed pre-filled
  • Microsoft Outlook — opens Outlook’s web subscription dialog
  • Apple Calendar — triggers the native Calendar app via webcal://
  • Copy URL — for any other calendar app that supports ICS feeds

Available feeds

Always available:

  • Bookmarked Reminders — your bookmarks that have reminder dates

With the discourse-calendar plugin enabled:

  • All Events — all forum events
  • My Events — events you’re going to or interested in

For plugin developers

Plugins can register additional ICS feeds using the new register_calendar_subscription_feed API. Feeds registered this way automatically appear in the Calendar preferences tab when the plugin is enabled.

Security

Subscription URLs use scoped user API keys restricted to read-only ICS format access. Keys are rate-limited, and URLs are displayed only once at generation time — users can regenerate at any time, which revokes the old URLs.

13 לייקים

Thank you @Falco, but how do you remove the corporate options? I find it offensive for my community to have to see advertising for proprietary services.

You can hide it with CSS.

2 לייקים

Thanks a lot for this implementation - this will increase the usability of the calendar/events plugin for many communities!

I have the same objection as @hellekin: within Discourse, we are in an Open Source environment. In our community, nobody use either Google Calendar or Microsoft. If users need a link for these proprietary services, they should decide by themselves, not the application. Thus I would prefer to select the kind of external Calendar service upon the creation step of the subscription URLs (e.g. with some check boxes), not later.

“filter”enhancement

We have multiple communities on our discourse instance. They are separated by group permissions and some users are member of more than one community. It would be convenient to filter the “Discourse Calendar - All Events” URL so that it only displays a particular communities calendar entries. Sample URL

https://discourse.example.com/discourse-post-event/events.ics?user_api_key=c2aa22d800dd473b62d199d796742382&group=[groupname]

With this enhancement it would be possible to share the Discourse events of a particular (!) community on their own website, eg. with the WordPress plugin “ICS calendar”

לייק 1

Another small proposed enhancement: if you want to subscribe the Discourse events on two different clients (e.g. Thunderbird on two devices), you need to copy the url two times. But currently the URL is only displayed once. If you add a second client you have to regenerate the URLs and the you loose the first ones.