Create share link
create_share_linkGenerate a public Nextcloud share link for a file or folder via the OCS Share API, with read-only access by default and optional password, label, expiry, or permissions.
Instructions
Create a public Nextcloud share link via the OCS Share API (shareType 3). Default permission is read-only. Does not send email. The password is not included in the result. Some Nextcloud versions rewrite link permissions on create; the result reports the permissions the server stored.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File or folder to share, relative to the files root. The files root itself is refused. | |
| label | No | Optional label stored on the share. | |
| password | No | Optional password for the public link. Not echoed back. | |
| expireDate | No | Optional expiry date YYYY-MM-DD. | |
| permissions | No | Bit mask. 1 read, 2 update, 4 create, 8 delete, 16 share. Default 1 (read). |