- Find file for shared link
- Get shared link for file
- Add shared link to file
- Update shared link on file
- Remove shared link from file
Returns the file represented by a shared link.
A shared file 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 file when only given a shared link.
The shared_link_permission_options
array field can be returned
by requesting it in the fields
query parameter.
This operation is performed by calling function FindFileForSharedLink
.
See the endpoint docs at API Reference.
await userClient.SharedLinksFiles.FindFileForSharedLinkAsync(queryParams: new FindFileForSharedLinkQueryParams(), headers: new FindFileForSharedLinkHeaders(boxapi: string.Concat("shared_link=", NullableUtils.Unwrap(fileFromApi.SharedLink).Url, "&shared_link_password=incorrectPassword")));
- queryParams
FindFileForSharedLinkQueryParams
- Query parameters of findFileForSharedLink method
- headers
FindFileForSharedLinkHeaders
- Headers of findFileForSharedLink method
- cancellationToken
System.Threading.CancellationToken?
- Token used for request cancellation.
This function returns a value of type FileFull
.
Returns a full file resource if the shared link is valid and the user has access to it.
Gets the information for a shared link on a file.
This operation is performed by calling function GetSharedLinkForFile
.
See the endpoint docs at API Reference.
await client.SharedLinksFiles.GetSharedLinkForFileAsync(fileId: fileId, queryParams: new GetSharedLinkForFileQueryParams(fields: "shared_link"));
- fileId
string
- The unique identifier that represents a file. The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL
https://*.app.box.com/files/123
thefile_id
is123
. Example: "12345"
- The unique identifier that represents a file. The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL
- queryParams
GetSharedLinkForFileQueryParams
- Query parameters of getSharedLinkForFile method
- headers
GetSharedLinkForFileHeaders
- Headers of getSharedLinkForFile method
- cancellationToken
System.Threading.CancellationToken?
- Token used for request cancellation.
This function returns a value of type FileFull
.
Returns the base representation of a file with the additional shared link information.
Adds a shared link to a file.
This operation is performed by calling function AddShareLinkToFile
.
See the endpoint docs at API Reference.
await client.SharedLinksFiles.AddShareLinkToFileAsync(fileId: fileId, requestBody: new AddShareLinkToFileRequestBody() { SharedLink = new AddShareLinkToFileRequestBodySharedLinkField() { Access = AddShareLinkToFileRequestBodySharedLinkAccessField.Open, Password = "Secret123@" } }, queryParams: new AddShareLinkToFileQueryParams(fields: "shared_link"));
- fileId
string
- The unique identifier that represents a file. The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL
https://*.app.box.com/files/123
thefile_id
is123
. Example: "12345"
- The unique identifier that represents a file. The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL
- requestBody
AddShareLinkToFileRequestBody
- Request body of addShareLinkToFile method
- queryParams
AddShareLinkToFileQueryParams
- Query parameters of addShareLinkToFile method
- headers
AddShareLinkToFileHeaders
- Headers of addShareLinkToFile method
- cancellationToken
System.Threading.CancellationToken?
- Token used for request cancellation.
This function returns a value of type FileFull
.
Returns the base representation of a file with a new shared link attached.
Updates a shared link on a file.
This operation is performed by calling function UpdateSharedLinkOnFile
.
See the endpoint docs at API Reference.
await client.SharedLinksFiles.UpdateSharedLinkOnFileAsync(fileId: fileId, requestBody: new UpdateSharedLinkOnFileRequestBody() { SharedLink = new UpdateSharedLinkOnFileRequestBodySharedLinkField() { Access = UpdateSharedLinkOnFileRequestBodySharedLinkAccessField.Collaborators } }, queryParams: new UpdateSharedLinkOnFileQueryParams(fields: "shared_link"));
- fileId
string
- The unique identifier that represents a file. The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL
https://*.app.box.com/files/123
thefile_id
is123
. Example: "12345"
- The unique identifier that represents a file. The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL
- requestBody
UpdateSharedLinkOnFileRequestBody
- Request body of updateSharedLinkOnFile method
- queryParams
UpdateSharedLinkOnFileQueryParams
- Query parameters of updateSharedLinkOnFile method
- headers
UpdateSharedLinkOnFileHeaders
- Headers of updateSharedLinkOnFile method
- cancellationToken
System.Threading.CancellationToken?
- Token used for request cancellation.
This function returns a value of type FileFull
.
Returns a basic representation of the file, with the updated shared link attached.
Removes a shared link from a file.
This operation is performed by calling function RemoveSharedLinkFromFile
.
See the endpoint docs at API Reference.
Currently we don't have an example for calling RemoveSharedLinkFromFile
in integration tests
- fileId
string
- The unique identifier that represents a file. The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL
https://*.app.box.com/files/123
thefile_id
is123
. Example: "12345"
- The unique identifier that represents a file. The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL
- requestBody
RemoveSharedLinkFromFileRequestBody
- Request body of removeSharedLinkFromFile method
- queryParams
RemoveSharedLinkFromFileQueryParams
- Query parameters of removeSharedLinkFromFile method
- headers
RemoveSharedLinkFromFileHeaders
- Headers of removeSharedLinkFromFile method
- cancellationToken
System.Threading.CancellationToken?
- Token used for request cancellation.
This function returns a value of type FileFull
.
Returns a basic representation of a file, with the shared link removed.