Docly Developers
Function API only Updated 23 Oct 2026

removeFolderShare(path, user)

Removes / terminates a user's access to a specific folder.

Parameters

pathstringrequired

Absolute path to folder to remove a user from.

userstring (email)required

Email to user to remove access.

Returns

An object { Success: true, Message: "", ResultCode: 0 } when the share is removed — test result.Success, not result === true. Throws "No such share!" (error 1) if the user has no share there (also when the email is not a Docly user or the share was already removed; the public everyone share is never touched), error -2 if the site's publisher may not invite users there or tries to end an administrator's access without being administrator, error 2 if it would end your own access while no one else is administrator, error 3 for the workspace owner, and error 101 for an invalid email. Returns null if the folder is not found. The call runs as the site's publisher.

Example

Normal JavaScript, running in the browser or on the Docly™ server.
docly.removeFolderShare("/", "test@docly.net");