Authenticated ICS feeds for private calendar events

The public ICS export has recently been reintroduced via

GET /discourse-post-event/events.ics, which is a great improvement following the work in

Re-Add full ICS export.

At the moment, this endpoint appears to be limited to events visible to anonymous users. As a result, events in private categories or categories restricted from the default everyone group cannot be subscribed to in external calendar clients (e.g. Google Calendar, Outlook).

Would it be feasible to support authenticated access to this endpoint, similar to how Discourse handles private RSS/Atom feeds (for example, via a per-user token or read-only API key)?

This wouldn’t change any permission rules - it would simply allow calendar clients to access events the user is already authorised to see.

I’m raising this as a separate, scoped request following the reintroduction of the public ICS feed, as previously suggested.

1 Like

After poring over the code I ended up coding up a very simple proxy that handles various hurdles needed to create a User API Key and pass it to the API; it also generates a link that the users need to paste in their calendar apps:

Hopefully all of this will one day make it to Discourse code and it will no longer be needed - in the meantime I am sharing this in the hope of making life easier for others.