Remove Shared Link

Remove Shared Link

A shared link may be removed from a resource by calling the update file or update folder endpoint and setting the shared_link value to null.

If you delete the shared link and create a new one, the new shared link will have a different URL and users with the old URL will not be able to access the resource.

To remove a shared link on a file, specify the ID of file to set the shared_link field to null.

Java
BoxFile file = new BoxFile(api, "12345")
BoxFile.Info info = file.getInfo()
info.removeSharedLink()
file.updateInfo(info)

To remove a shared link on a folder, specify the ID of folder to set the shared_link field to null.

Java
BoxFolder folder = new BoxFolder(api, "12345");
BoxFolder.Info info = folder.getInfo();
info.removeSharedLink()
folder.updateInfo(info)