# API for sharing calendars/task-lists?

**URL:** <https://help.nextcloud.com/t/api-for-sharing-calendars-task-lists/78885>\
**Category:** ℹ️ Support\
**Tags:** calendar-app, sharing\
**Created:** [April 22, 2020, 8:58pm UTC](https://help.nextcloud.com/t/api-for-sharing-calendars-task-lists/78885 "2020-04-22T20:58:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bernie\_O](https://help.nextcloud.com/user_avatar/help.nextcloud.com/bernie_o/32/40181_2.png) [@Bernie\_O](https://help.nextcloud.com/u/Bernie_O)\
**Post date:** [April 22, 2020, 8:58pm UTC](https://help.nextcloud.com/t/api-for-sharing-calendars-task-lists/78885/1 "2020-04-22T20:58:18Z")

</div>

I am looking for a way to share a task list with another user via script. I’ve looked in the documentation, but did only find an API to share files between users.

Is there also an API to share/unshare task lists or calendars between users?

---

<div class="post-metadata">

**Author:** ![tcit](https://help.nextcloud.com/user_avatar/help.nextcloud.com/tcit/32/5931_2.png) [@tcit](https://help.nextcloud.com/u/tcit)\
**Post date:** [April 23, 2020, 6:33am UTC](https://help.nextcloud.com/t/api-for-sharing-calendars-task-lists/78885/2 "2020-04-23T06:33:32Z")

</div>

The API being used is CalDAV with a few specific properties, which are more or less what’s being described [here](https://tools.ietf.org/html/draft-pot-webdav-resource-sharing-03) (RFC was never finished).  
The best would be to look in the network tab of your browser developer tool to see what content is being sent when sharing a calendar or task, or look at how [the javascript library we use](https://github.com/nextcloud/cdav-library/blob/master/src/models/davCollectionShareable.js#L50) does it.

---

<div class="post-metadata">

**Author:** ![Schorsch\_Zwanglos](https://help.nextcloud.com/letter_avatar/schorsch_zwanglos/32/5_5575768a8748004e209b776fc1b2916d.png) [@Schorsch\_Zwanglos](https://help.nextcloud.com/u/Schorsch_Zwanglos)\
**Post date:** [April 23, 2020, 8:05am UTC](https://help.nextcloud.com/t/api-for-sharing-calendars-task-lists/78885/3 "2020-04-23T08:05:35Z")

</div>

As a work around you can share all records from your database table.  
Just select the right calendar by using calendarid:

select \* from oc\_calendarobjects where calendarid = 1;

---

<div class="post-metadata">

**Author:** ![Bernie\_O](https://help.nextcloud.com/user_avatar/help.nextcloud.com/bernie_o/32/40181_2.png) [@Bernie\_O](https://help.nextcloud.com/u/Bernie_O)\
**Post date:** [April 23, 2020, 9:43am UTC](https://help.nextcloud.com/t/api-for-sharing-calendars-task-lists/78885/4 "2020-04-23T09:43:23Z")

</div>

> [@tcit](#):
>
> being described [here](https://tools.ietf.org/html/draft-pot-webdav-resource-sharing-03) (RFC was never finished).

Excellent. I didn‘t know sharing is possible via CalDAV. That‘s exactly what I was looking for. Thanks!

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 12, 2024, 6:32am UTC](https://help.nextcloud.com/t/api-for-sharing-calendars-task-lists/78885/5 "2024-12-12T06:32:39Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 12, 2024, 6:32am UTC](https://help.nextcloud.com/t/api-for-sharing-calendars-task-lists/78885/6 "2024-12-12T06:32:40Z")

</div>


