Update Shared Link

Update Shared Link

A shared link may be updated from a resource by calling the update file or update folder endpoint, specifying the ID of the resource to update with the new shared link values. See the create shared link guide for all available parameters.

If you update the shared link settings, the new settings will apply to any users who already have the URL.

To update a shared link on a file, specify the ID of the file with any optional shared link parameters.

.NET
string fileId = "11111";
var sharedLinkParams = new BoxSharedLinkRequest()
{
    Access = BoxSharedLinkAccessType.open
};
BoxFile file = client.FilesManager.CreateSharedLinkAsync(fileId, sharedLinkParams);
string sharedLinkUrl = file.SharedLink.Url;

To update a shared link on a folder, specify the ID of the folder with any optional shared link parameters.

.NET
var sharedLinkParams = new BoxSharedLinkRequest()
{
    Access = BoxSharedLinkAccessType.open
};
BoxFolder folder = await client.FoldersManager.CreateSharedLinkAsync("11111", sharedLinkParams);
string sharedLinkUrl = folder.SharedLink.Url;