Return the folder represented by a shared link.
A shared folder can be represented by a shared link, which can originate within the current enterprise or within another.
This endpoint allows an application to retrieve information about a shared folder when only given a shared link.
This operation is performed by calling function findFolderForSharedLink.
See the endpoint docs at API Reference.
await userClient.sharedLinksFolders.findFolderForSharedLink(
{} satisfies FindFolderForSharedLinkQueryParams,
{
boxapi: ''.concat(
'shared_link=',
folderFromApi.sharedLink!.url,
'&shared_link_password=Secret123@',
) as string,
} satisfies FindFolderForSharedLinkHeadersInput,
);
FindFolderForSharedLinkQueryParams
FindFolderForSharedLinkHeadersInput
FindFolderForSharedLinkOptionalsInputThis function returns a value of type FolderFull.
Returns a full folder resource if the shared link is valid and the user has access to it.
Gets the information for a shared link on a folder.
This operation is performed by calling function getSharedLinkForFolder.
See the endpoint docs at API Reference.
await client.sharedLinksFolders.getSharedLinkForFolder(folder.id, {
fields: 'shared_link',
} satisfies GetSharedLinkForFolderQueryParams);
string
https://*.app.box.com/folder/123 the folder_id is 123. The root folder of a Box account is always represented by the ID 0. Example: “12345”GetSharedLinkForFolderQueryParams
GetSharedLinkForFolderOptionalsInputThis function returns a value of type FolderFull.
Returns the base representation of a folder with the additional shared link information.
Adds a shared link to a folder.
This operation is performed by calling function addShareLinkToFolder.
See the endpoint docs at API Reference.
await client.sharedLinksFolders.addShareLinkToFolder(
folder.id,
{
sharedLink: {
access: 'open' as AddShareLinkToFolderRequestBodySharedLinkAccessField,
password: 'Secret123@',
} satisfies AddShareLinkToFolderRequestBodySharedLinkField,
} satisfies AddShareLinkToFolderRequestBody,
{ fields: 'shared_link' } satisfies AddShareLinkToFolderQueryParams,
);
string
https://*.app.box.com/folder/123 the folder_id is 123. The root folder of a Box account is always represented by the ID 0. Example: “12345”AddShareLinkToFolderRequestBody
AddShareLinkToFolderQueryParams
AddShareLinkToFolderOptionalsInputThis function returns a value of type FolderFull.
Returns the base representation of a folder with a new shared link attached.
Updates a shared link on a folder.
This operation is performed by calling function updateSharedLinkOnFolder.
See the endpoint docs at API Reference.
await client.sharedLinksFolders.updateSharedLinkOnFolder(
folder.id,
{
sharedLink: {
access:
'collaborators' as UpdateSharedLinkOnFolderRequestBodySharedLinkAccessField,
} satisfies UpdateSharedLinkOnFolderRequestBodySharedLinkField,
} satisfies UpdateSharedLinkOnFolderRequestBody,
{ fields: 'shared_link' } satisfies UpdateSharedLinkOnFolderQueryParams,
);
string
https://*.app.box.com/folder/123 the folder_id is 123. The root folder of a Box account is always represented by the ID 0. Example: “12345”UpdateSharedLinkOnFolderRequestBody
UpdateSharedLinkOnFolderQueryParams
UpdateSharedLinkOnFolderOptionalsInputThis function returns a value of type FolderFull.
Returns a basic representation of the folder, with the updated shared link attached.
Removes a shared link from a folder.
This operation is performed by calling function removeSharedLinkFromFolder.
See the endpoint docs at API Reference.
await client.sharedLinksFolders.removeSharedLinkFromFolder(
folder.id,
{ sharedLink: createNull() } satisfies RemoveSharedLinkFromFolderRequestBody,
{ fields: 'shared_link' } satisfies RemoveSharedLinkFromFolderQueryParams,
);
string
https://*.app.box.com/folder/123 the folder_id is 123. The root folder of a Box account is always represented by the ID 0. Example: “12345”RemoveSharedLinkFromFolderRequestBody
RemoveSharedLinkFromFolderQueryParams
RemoveSharedLinkFromFolderOptionalsInputThis function returns a value of type FolderFull.
Returns a basic representation of a folder, with the shared link removed.