Gets the information for a shared link on a folder.
12345
The unique identifier that represent a folder.
The ID for any folder can be determined
by visiting this folder in the web application
and copying the ID from the URL. For example,
for the URL 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
.
shared_link
Explicitly request the shared_link
fields
to be returned for this item.
Returns the base representation of a folder with the additional shared link information.
Returned when the access token provided in the Authorization
header
is not recognized or not provided.
Returned if the folder is not found, or the user does not have access to the folder.
Returned if the folder_id
is not in a recognized format.
An unexpected client error.
curl -i -X GET "https://api.box.com/2.0/folders/32423234?fields=shared_link" \
-H "authorization: Bearer <ACCESS_TOKEN>"
await client.sharedLinksFolders.getSharedLinkForFolder(folder.id, {
fields: 'shared_link',
} satisfies GetSharedLinkForFolderQueryParams);
client.shared_links_folders.get_shared_link_for_folder(folder.id, "shared_link")
await client.SharedLinksFolders.GetSharedLinkForFolderAsync(folderId: folder.Id, queryParams: new GetSharedLinkForFolderQueryParams(fields: "shared_link"));
BoxFolder folder = new BoxFolder(api, "id");
BoxFolder.Info info = folder.getInfo()
BoxSharedLink link = info.getSharedLink()
String url = link.getUrl()
folder_id = '11111'
shared_link = client.folder(folder_id).get().shared_link
url = shared_link['url']
client.folders.get('11111', { fields: 'shared_link' })
.then(folder => {
let url = folder.shared_link.url
//...
})
client.folders.getSharedLink(forFolder: "11111") { (result: Result<SharedLink, BoxSDKError>) in
guard case let .success(sharedLink) = result else {
print("Error retrieving folder shared link")
return
}
print("Folder shared link URL is \(sharedLink.url), with \(sharedLink.access) access")
}
{
"etag": "1",
"id": "12345",
"shared_link": {
"access": "open",
"download_count": 0,
"download_url": "https://app.box.com/shared/static/kwio6b4ovt1264rnfbyqo1.pdf",
"effective_access": "open",
"effective_permission": "can_download",
"is_password_enabled": false,
"permissions": {
"can_download": true,
"can_edit": false,
"can_preview": true
},
"preview_count": 0,
"unshared_at": "2020-09-21T10:34:41-07:00",
"url": "https://app.box.com/s/kwio6b4ovt1264rnfbyqo1",
"vanity_name": null,
"vanity_url": null
},
"type": "folder"
}