Return the file or folder represented by a shared link.
Shared items are any files or folders that are represented by a shared link, which can originate within the current enterprise or within another one.
This endpoint allows an application to retrieve information about a shared item when only given a shared link.
id,type,nameA comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.
Be aware that specifying this parameter will have the effect that none of the standard fields are returned in the response unless explicitly specified, instead only fields for the mini representation are returned, additional to the fields requested.
shared_link=https://cloud.box.com/shared/static/gjasdasjhasd&shared_link_password=letmeinA header containing the shared link and optional password for the shared link.
The format for this header is as follows.
shared_link=[link]&shared_link_password=[password]
1Ensures an item is only returned if it has changed.
Pass in the item's last observed etag value
into this header and the endpoint will fail
with a 304 Not Modified if the item has not
changed since.
Returns an empty response when the If-None-Match header matches
the current etag value of the folder. This indicates that the folder
has not changed since it was last requested.
An unexpected client error.
curl -X GET https://api.box.com/2.0/shared_items \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
-H "BoxApi: shared_link=https://cloud.box.com/shared/static/gjasdasjhasd&shared_link_password=letmein"String sharedLink = "https://app.box.com/s/abcdefghijklmnopqrstuvwxyz123456";
String password = "foo";
BoxItem.Info itemInfo = BoxItem.getSharedItem(api, sharedLink, password);client.sharedItems.get(
'https://app.box.com/s/1a2b3c4d5e',
null,
{fields: 'type,id,parent,extension,shared_link'},
callback
);client.sharedItems.get(
sharedLinkURL: "https://app.box.com/s/qqwertyuiopasdfghjklzxcvbnm123456"
) { (result: Result<SharedItem, BoxSDKError>) in
guard case let .success(item) = result else {
print("Error resolving shared item")
return
}
print("The shared link resolves to item:")
switch item {
case let .file(file):
print("- File \(file.name) (ID: \(file.id))")
case let .folder(folder):
print("- Folder \(file.name) (ID: \(file.id))")
case let .webLink(webLink):
print("- Web Link \(file.name) (ID: \(file.id))")
}
}