DBSHARINGUserAuthRoutes
Objective-C
@interface DBSHARINGUserAuthRoutes : NSObject
Swift
class DBSHARINGUserAuthRoutes : NSObject
Routes for the Sharing
namespace
-
An instance of the networking client that each route will use to submit a request.
Declaration
Objective-C
@property (nonatomic, readonly) id<DBTransportClient> _Nonnull client;
-
Initializes the
DBSHARINGUserAuthRoutes
namespace container object with a networking client.Declaration
Objective-C
- (nonnull instancetype)init:(nonnull id<DBTransportClient>)client;
-
Adds specified members to a file.
Declaration
Objective-C
- (nonnull DBRpcTask<NSArray<DBSHARINGFileMemberActionResult *> *, DBSHARINGAddFileMemberError *> *) addFileMember:(nonnull NSString *)file members:(nonnull NSArray<DBSHARINGMemberSelector *> *)members;
Swift
func addFileMember(_ file: String, members: [DBSHARINGMemberSelector]) -> DBRpcTask<NSArray, DBSHARINGAddFileMemberError>
Parameters
file
File to which to add members.
members
Members to add. Note that even an email address is given, this may result in a user being directly added to the membership if that email is the user’s main account email.
Return Value
Through the response callback, the caller will receive a
NSArray<DBSHARINGFileMemberActionResult *>
object on success or aDBSHARINGAddFileMemberError
object on failure. -
Adds specified members to a file.
Declaration
Objective-C
- (nonnull DBRpcTask<NSArray<DBSHARINGFileMemberActionResult *> *, DBSHARINGAddFileMemberError *> *) addFileMember:(nonnull NSString *)file members:(nonnull NSArray<DBSHARINGMemberSelector *> *)members customMessage:(nullable NSString *)customMessage quiet:(nullable NSNumber *)quiet accessLevel:(nullable DBSHARINGAccessLevel *)accessLevel addMessageAsComment:(nullable NSNumber *)addMessageAsComment;
Swift
func addFileMember(_ file: String, members: [DBSHARINGMemberSelector], customMessage: String?, quiet: NSNumber?, accessLevel: DBSHARINGAccessLevel?, addMessageAsComment: NSNumber?) -> DBRpcTask<NSArray, DBSHARINGAddFileMemberError>
Parameters
file
File to which to add members.
members
Members to add. Note that even an email address is given, this may result in a user being directly added to the membership if that email is the user’s main account email.
customMessage
Message to send to added members in their invitation.
quiet
Whether added members should be notified via email and device notifications of their invitation.
accessLevel
AccessLevel union object, describing what access level we want to give new members.
addMessageAsComment
If the custom message should be added as a comment on the file.
Return Value
Through the response callback, the caller will receive a
NSArray<DBSHARINGFileMemberActionResult *>
object on success or aDBSHARINGAddFileMemberError
object on failure. -
Allows an owner or editor (if the ACL update policy allows) of a shared folder to add another member. For the new member to get access to all the functionality for this folder, you will need to call
mountFolder
on their behalf.Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBSHARINGAddFolderMemberError *> *) addFolderMember:(nonnull NSString *)sharedFolderId members:(nonnull NSArray<DBSHARINGAddMember *> *)members;
Swift
func addFolderMember(_ sharedFolderId: String, members: [DBSHARINGAddMember]) -> DBRpcTask<DBNilObject, DBSHARINGAddFolderMemberError>
Parameters
sharedFolderId
The ID for the shared folder.
members
The intended list of members to add. Added members will receive invites to join the shared folder.
Return Value
Through the response callback, the caller will receive a
void
object on success or aDBSHARINGAddFolderMemberError
object on failure. -
Allows an owner or editor (if the ACL update policy allows) of a shared folder to add another member. For the new member to get access to all the functionality for this folder, you will need to call
mountFolder
on their behalf.Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBSHARINGAddFolderMemberError *> *) addFolderMember:(nonnull NSString *)sharedFolderId members:(nonnull NSArray<DBSHARINGAddMember *> *)members quiet:(nullable NSNumber *)quiet customMessage:(nullable NSString *)customMessage;
Swift
func addFolderMember(_ sharedFolderId: String, members: [DBSHARINGAddMember], quiet: NSNumber?, customMessage: String?) -> DBRpcTask<DBNilObject, DBSHARINGAddFolderMemberError>
Parameters
sharedFolderId
The ID for the shared folder.
members
The intended list of members to add. Added members will receive invites to join the shared folder.
quiet
Whether added members should be notified via email and device notifications of their invite.
customMessage
Optional message to display to added members in their invitation.
Return Value
Through the response callback, the caller will receive a
void
object on success or aDBSHARINGAddFolderMemberError
object on failure. -
Returns the status of an asynchronous job.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGJobStatus *, DBASYNCPollError *> *)checkJobStatus: (nonnull NSString *)asyncJobId;
Swift
func checkJobStatus(_ asyncJobId: String) -> DBRpcTask<DBSHARINGJobStatus, DBASYNCPollError>
Parameters
asyncJobId
Id of the asynchronous job. This is the value of a response returned from the method that launched the job.
Return Value
Through the response callback, the caller will receive a
DBSHARINGJobStatus
object on success or aDBASYNCPollError
object on failure. -
Returns the status of an asynchronous job for sharing a folder.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGRemoveMemberJobStatus *, DBASYNCPollError *> *) checkRemoveMemberJobStatus:(nonnull NSString *)asyncJobId;
Swift
func checkRemoveMemberJobStatus(_ asyncJobId: String) -> DBRpcTask<DBSHARINGRemoveMemberJobStatus, DBASYNCPollError>
Parameters
asyncJobId
Id of the asynchronous job. This is the value of a response returned from the method that launched the job.
Return Value
Through the response callback, the caller will receive a
DBSHARINGRemoveMemberJobStatus
object on success or aDBASYNCPollError
object on failure. -
Returns the status of an asynchronous job for sharing a folder.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGShareFolderJobStatus *, DBASYNCPollError *> *) checkShareJobStatus:(nonnull NSString *)asyncJobId;
Swift
func checkShareJobStatus(_ asyncJobId: String) -> DBRpcTask<DBSHARINGShareFolderJobStatus, DBASYNCPollError>
Parameters
asyncJobId
Id of the asynchronous job. This is the value of a response returned from the method that launched the job.
Return Value
Through the response callback, the caller will receive a
DBSHARINGShareFolderJobStatus
object on success or aDBASYNCPollError
object on failure. -
Deprecated
createSharedLink is deprecated. Use createSharedLinkWithSettings.
DEPRECATED: Create a shared link. If a shared link already exists for the given path, that link is returned. Previously, it was technically possible to break a shared link by moving or renaming the corresponding file or folder. In the future, this will no longer be the case, so your app shouldn’t rely on this behavior. Instead, if your app needs to revoke a shared link, use
revokeSharedLink
.Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGPathLinkMetadata *, DBSHARINGCreateSharedLinkError *> *)createSharedLink: (nonnull NSString *)path;
Swift
func createSharedLink(_ path: String) -> DBRpcTask<DBSHARINGPathLinkMetadata, DBSHARINGCreateSharedLinkError>
Parameters
path
The path to share.
Return Value
Through the response callback, the caller will receive a
DBSHARINGPathLinkMetadata
object on success or aDBSHARINGCreateSharedLinkError
object on failure. -
Deprecated
createSharedLink is deprecated. Use createSharedLinkWithSettings.
DEPRECATED: Create a shared link. If a shared link already exists for the given path, that link is returned. Previously, it was technically possible to break a shared link by moving or renaming the corresponding file or folder. In the future, this will no longer be the case, so your app shouldn’t rely on this behavior. Instead, if your app needs to revoke a shared link, use
revokeSharedLink
.Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGPathLinkMetadata *, DBSHARINGCreateSharedLinkError *> *) createSharedLink:(nonnull NSString *)path shortUrl:(nullable NSNumber *)shortUrl pendingUpload:(nullable DBSHARINGPendingUploadMode *)pendingUpload;
Swift
func createSharedLink(_ path: String, shortUrl: NSNumber?, pendingUpload: DBSHARINGPendingUploadMode?) -> DBRpcTask<DBSHARINGPathLinkMetadata, DBSHARINGCreateSharedLinkError>
Parameters
path
The path to share.
pendingUpload
If it’s okay to share a path that does not yet exist, set this to either
file
inDBSHARINGPendingUploadMode
orfolder
inDBSHARINGPendingUploadMode
to indicate whether to assume it’s a file or folder.Return Value
Through the response callback, the caller will receive a
DBSHARINGPathLinkMetadata
object on success or aDBSHARINGCreateSharedLinkError
object on failure. -
Create a shared link with custom settings. If no settings are given then the default visibility is
public
inDBSHARINGRequestedVisibility
(The resolved visibility, though, may depend on other aspects such as team and shared folder settings).Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGSharedLinkMetadata *, DBSHARINGCreateSharedLinkWithSettingsError *> *) createSharedLinkWithSettings:(nonnull NSString *)path;
Swift
func createSharedLink(withSettings path: String) -> DBRpcTask<DBSHARINGSharedLinkMetadata, DBSHARINGCreateSharedLinkWithSettingsError>
Parameters
path
The path to be shared by the shared link.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedLinkMetadata
object on success or aDBSHARINGCreateSharedLinkWithSettingsError
object on failure. -
Create a shared link with custom settings. If no settings are given then the default visibility is
public
inDBSHARINGRequestedVisibility
(The resolved visibility, though, may depend on other aspects such as team and shared folder settings).Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGSharedLinkMetadata *, DBSHARINGCreateSharedLinkWithSettingsError *> *) createSharedLinkWithSettings:(nonnull NSString *)path settings: (nullable DBSHARINGSharedLinkSettings *)settings;
Swift
func createSharedLink(withSettings path: String, settings: DBSHARINGSharedLinkSettings?) -> DBRpcTask<DBSHARINGSharedLinkMetadata, DBSHARINGCreateSharedLinkWithSettingsError>
Parameters
path
The path to be shared by the shared link.
settings
The requested settings for the newly created shared link.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedLinkMetadata
object on success or aDBSHARINGCreateSharedLinkWithSettingsError
object on failure. -
Returns shared file metadata.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGSharedFileMetadata *, DBSHARINGGetFileMetadataError *> *)getFileMetadata: (nonnull NSString *)file;
Swift
func getFileMetadata(_ file: String) -> DBRpcTask<DBSHARINGSharedFileMetadata, DBSHARINGGetFileMetadataError>
Parameters
file
The file to query.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedFileMetadata
object on success or aDBSHARINGGetFileMetadataError
object on failure. -
Returns shared file metadata.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGSharedFileMetadata *, DBSHARINGGetFileMetadataError *> *) getFileMetadata:(nonnull NSString *)file actions:(nullable NSArray<DBSHARINGFileAction *> *)actions;
Swift
func getFileMetadata(_ file: String, actions: [DBSHARINGFileAction]?) -> DBRpcTask<DBSHARINGSharedFileMetadata, DBSHARINGGetFileMetadataError>
Parameters
file
The file to query.
actions
A list of
FileAction
s corresponding toFilePermission
s that should appear in the response’spermissions
inDBSHARINGSharedFileMetadata
field describing the actions the authenticated user can perform on the file.Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedFileMetadata
object on success or aDBSHARINGGetFileMetadataError
object on failure. -
Returns shared file metadata.
Declaration
Objective-C
- (nonnull DBRpcTask<NSArray<DBSHARINGGetFileMetadataBatchResult *> *, DBSHARINGSharingUserError *> *)getFileMetadataBatch: (nonnull NSArray<NSString *> *)files;
Swift
func getFileMetadataBatch(_ files: [String]) -> DBRpcTask<NSArray, DBSHARINGSharingUserError>
Parameters
files
The files to query.
Return Value
Through the response callback, the caller will receive a
NSArray<DBSHARINGGetFileMetadataBatchResult *>
object on success or aDBSHARINGSharingUserError
object on failure. -
Returns shared file metadata.
Declaration
Objective-C
- (nonnull DBRpcTask<NSArray<DBSHARINGGetFileMetadataBatchResult *> *, DBSHARINGSharingUserError *> *) getFileMetadataBatch:(nonnull NSArray<NSString *> *)files actions:(nullable NSArray<DBSHARINGFileAction *> *)actions;
Swift
func getFileMetadataBatch(_ files: [String], actions: [DBSHARINGFileAction]?) -> DBRpcTask<NSArray, DBSHARINGSharingUserError>
Parameters
files
The files to query.
actions
A list of
FileAction
s corresponding toFilePermission
s that should appear in the response’spermissions
inDBSHARINGSharedFileMetadata
field describing the actions the authenticated user can perform on the file.Return Value
Through the response callback, the caller will receive a
NSArray<DBSHARINGGetFileMetadataBatchResult *>
object on success or aDBSHARINGSharingUserError
object on failure. -
Returns shared folder metadata by its folder ID.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGSharedFolderMetadata *, DBSHARINGSharedFolderAccessError *> *)getFolderMetadata: (nonnull NSString *)sharedFolderId;
Swift
func getFolderMetadata(_ sharedFolderId: String) -> DBRpcTask<DBSHARINGSharedFolderMetadata, DBSHARINGSharedFolderAccessError>
Parameters
sharedFolderId
The ID for the shared folder.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedFolderMetadata
object on success or aDBSHARINGSharedFolderAccessError
object on failure. -
Returns shared folder metadata by its folder ID.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGSharedFolderMetadata *, DBSHARINGSharedFolderAccessError *> *) getFolderMetadata:(nonnull NSString *)sharedFolderId actions:(nullable NSArray<DBSHARINGFolderAction *> *)actions;
Swift
func getFolderMetadata(_ sharedFolderId: String, actions: [DBSHARINGFolderAction]?) -> DBRpcTask<DBSHARINGSharedFolderMetadata, DBSHARINGSharedFolderAccessError>
Parameters
sharedFolderId
The ID for the shared folder.
actions
A list of
FolderAction
s corresponding toFolderPermission
s that should appear in the response’spermissions
inDBSHARINGSharedFolderMetadata
field describing the actions the authenticated user can perform on the folder.Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedFolderMetadata
object on success or aDBSHARINGSharedFolderAccessError
object on failure. -
Download the shared link’s file from a user’s Dropbox.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBSHARINGSharedLinkMetadata *, DBSHARINGGetSharedLinkFileError *> *) getSharedLinkFileUrl:(nonnull NSString *)url overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination;
Swift
func getSharedLinkFileUrl(_ url: String, overwrite: Bool, destination: URL) -> DBDownloadUrlTask<DBSHARINGSharedLinkMetadata, DBSHARINGGetSharedLinkFileError>
Parameters
url
URL of the shared link.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedLinkMetadata
object on success or aDBSHARINGGetSharedLinkFileError
object on failure. -
Download the shared link’s file from a user’s Dropbox.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBSHARINGSharedLinkMetadata *, DBSHARINGGetSharedLinkFileError *> *) getSharedLinkFileUrl:(nonnull NSString *)url path:(nullable NSString *)path linkPassword:(nullable NSString *)linkPassword overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination;
Swift
func getSharedLinkFileUrl(_ url: String, path: String?, linkPassword: String?, overwrite: Bool, destination: URL) -> DBDownloadUrlTask<DBSHARINGSharedLinkMetadata, DBSHARINGGetSharedLinkFileError>
Parameters
url
URL of the shared link.
path
If the shared link is to a folder, this parameter can be used to retrieve the metadata for a specific file or sub-folder in this folder. A relative path should be used.
linkPassword
If the shared link has a password, this parameter can be used.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedLinkMetadata
object on success or aDBSHARINGGetSharedLinkFileError
object on failure. -
Download the shared link’s file from a user’s Dropbox.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBSHARINGSharedLinkMetadata *, DBSHARINGGetSharedLinkFileError *> *) getSharedLinkFileUrl:(nonnull NSString *)url overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;
Swift
func getSharedLinkFileUrl(_ url: String, overwrite: Bool, destination: URL, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadUrlTask<DBSHARINGSharedLinkMetadata, DBSHARINGGetSharedLinkFileError>
Parameters
url
URL of the shared link.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedLinkMetadata
object on success or aDBSHARINGGetSharedLinkFileError
object on failure. -
Download the shared link’s file from a user’s Dropbox.
Declaration
Objective-C
- (nonnull DBDownloadUrlTask<DBSHARINGSharedLinkMetadata *, DBSHARINGGetSharedLinkFileError *> *) getSharedLinkFileUrl:(nonnull NSString *)url path:(nullable NSString *)path linkPassword:(nullable NSString *)linkPassword overwrite:(BOOL)overwrite destination:(nonnull NSURL *)destination byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;
Swift
func getSharedLinkFileUrl(_ url: String, path: String?, linkPassword: String?, overwrite: Bool, destination: URL, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadUrlTask<DBSHARINGSharedLinkMetadata, DBSHARINGGetSharedLinkFileError>
Parameters
url
URL of the shared link.
path
If the shared link is to a folder, this parameter can be used to retrieve the metadata for a specific file or sub-folder in this folder. A relative path should be used.
linkPassword
If the shared link has a password, this parameter can be used.
overwrite
A boolean to set behavior in the event of a naming conflict.
YES
will overwrite conflicting file at destination.NO
will take no action, resulting in anNSError
returned to the response handler in the event of a file conflict.destination
The file url of the desired download output location.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedLinkMetadata
object on success or aDBSHARINGGetSharedLinkFileError
object on failure. -
Download the shared link’s file from a user’s Dropbox.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBSHARINGSharedLinkMetadata *, DBSHARINGGetSharedLinkFileError *> *) getSharedLinkFileData:(nonnull NSString *)url;
Swift
func getSharedLinkFileData(_ url: String) -> DBDownloadDataTask<DBSHARINGSharedLinkMetadata, DBSHARINGGetSharedLinkFileError>
Parameters
url
URL of the shared link.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedLinkMetadata
object on success or aDBSHARINGGetSharedLinkFileError
object on failure. -
Download the shared link’s file from a user’s Dropbox.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBSHARINGSharedLinkMetadata *, DBSHARINGGetSharedLinkFileError *> *) getSharedLinkFileData:(nonnull NSString *)url path:(nullable NSString *)path linkPassword:(nullable NSString *)linkPassword;
Swift
func getSharedLinkFileData(_ url: String, path: String?, linkPassword: String?) -> DBDownloadDataTask<DBSHARINGSharedLinkMetadata, DBSHARINGGetSharedLinkFileError>
Parameters
url
URL of the shared link.
path
If the shared link is to a folder, this parameter can be used to retrieve the metadata for a specific file or sub-folder in this folder. A relative path should be used.
linkPassword
If the shared link has a password, this parameter can be used.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedLinkMetadata
object on success or aDBSHARINGGetSharedLinkFileError
object on failure. -
Download the shared link’s file from a user’s Dropbox.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBSHARINGSharedLinkMetadata *, DBSHARINGGetSharedLinkFileError *> *) getSharedLinkFileData:(nonnull NSString *)url byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;
Swift
func getSharedLinkFileData(_ url: String, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadDataTask<DBSHARINGSharedLinkMetadata, DBSHARINGGetSharedLinkFileError>
Parameters
url
URL of the shared link.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedLinkMetadata
object on success or aDBSHARINGGetSharedLinkFileError
object on failure. -
Download the shared link’s file from a user’s Dropbox.
Declaration
Objective-C
- (nonnull DBDownloadDataTask<DBSHARINGSharedLinkMetadata *, DBSHARINGGetSharedLinkFileError *> *) getSharedLinkFileData:(nonnull NSString *)url path:(nullable NSString *)path linkPassword:(nullable NSString *)linkPassword byteOffsetStart:(nonnull NSNumber *)byteOffsetStart byteOffsetEnd:(nonnull NSNumber *)byteOffsetEnd;
Swift
func getSharedLinkFileData(_ url: String, path: String?, linkPassword: String?, byteOffsetStart: NSNumber, byteOffsetEnd: NSNumber) -> DBDownloadDataTask<DBSHARINGSharedLinkMetadata, DBSHARINGGetSharedLinkFileError>
Parameters
url
URL of the shared link.
path
If the shared link is to a folder, this parameter can be used to retrieve the metadata for a specific file or sub-folder in this folder. A relative path should be used.
linkPassword
If the shared link has a password, this parameter can be used.
byteOffsetStart
For partial file download. Download file beginning from this starting byte position. Must include valid end range value.
byteOffsetEnd
For partial file download. Download file up until this ending byte position. Must include valid start range value.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedLinkMetadata
object on success or aDBSHARINGGetSharedLinkFileError
object on failure. -
Get the shared link’s metadata.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGSharedLinkMetadata *, DBSHARINGSharedLinkError *> *)getSharedLinkMetadata:(nonnull NSString *)url;
Swift
func getSharedLinkMetadata(_ url: String) -> DBRpcTask<DBSHARINGSharedLinkMetadata, DBSHARINGSharedLinkError>
Parameters
url
URL of the shared link.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedLinkMetadata
object on success or aDBSHARINGSharedLinkError
object on failure. -
Get the shared link’s metadata.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGSharedLinkMetadata *, DBSHARINGSharedLinkError *> *)getSharedLinkMetadata:(nonnull NSString *)url path:(nullable NSString *)path linkPassword:(nullable NSString *)linkPassword;
Swift
func getSharedLinkMetadata(_ url: String, path: String?, linkPassword: String?) -> DBRpcTask<DBSHARINGSharedLinkMetadata, DBSHARINGSharedLinkError>
Parameters
url
URL of the shared link.
path
If the shared link is to a folder, this parameter can be used to retrieve the metadata for a specific file or sub-folder in this folder. A relative path should be used.
linkPassword
If the shared link has a password, this parameter can be used.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedLinkMetadata
object on success or aDBSHARINGSharedLinkError
object on failure. -
Deprecated
getSharedLinks is deprecated. Use listSharedLinks.
DEPRECATED: Returns a list of LinkMetadata objects for this user, including collection links. If no path is given, returns a list of all shared links for the current user, including collection links, up to a maximum of 1000 links. If a non-empty path is given, returns a list of all shared links that allow access to the given path. Collection links are never returned in this case.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGGetSharedLinksResult *, DBSHARINGGetSharedLinksError *> *)getSharedLinks;
Swift
func getSharedLinks() -> DBRpcTask<DBSHARINGGetSharedLinksResult, DBSHARINGGetSharedLinksError>
Return Value
Through the response callback, the caller will receive a
DBSHARINGGetSharedLinksResult
object on success or aDBSHARINGGetSharedLinksError
object on failure. -
Deprecated
getSharedLinks is deprecated. Use listSharedLinks.
DEPRECATED: Returns a list of LinkMetadata objects for this user, including collection links. If no path is given, returns a list of all shared links for the current user, including collection links, up to a maximum of 1000 links. If a non-empty path is given, returns a list of all shared links that allow access to the given path. Collection links are never returned in this case.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGGetSharedLinksResult *, DBSHARINGGetSharedLinksError *> *)getSharedLinks: (nullable NSString *)path;
Swift
func getSharedLinks(_ path: String?) -> DBRpcTask<DBSHARINGGetSharedLinksResult, DBSHARINGGetSharedLinksError>
Parameters
path
See
getSharedLinks
description.Return Value
Through the response callback, the caller will receive a
DBSHARINGGetSharedLinksResult
object on success or aDBSHARINGGetSharedLinksError
object on failure. -
Use to obtain the members who have been invited to a file, both inherited and uninherited members.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGSharedFileMembers *, DBSHARINGListFileMembersError *> *)listFileMembers: (nonnull NSString *)file;
Swift
func listFileMembers(_ file: String) -> DBRpcTask<DBSHARINGSharedFileMembers, DBSHARINGListFileMembersError>
Parameters
file
The file for which you want to see members.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedFileMembers
object on success or aDBSHARINGListFileMembersError
object on failure. -
Use to obtain the members who have been invited to a file, both inherited and uninherited members.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGSharedFileMembers *, DBSHARINGListFileMembersError *> *) listFileMembers:(nonnull NSString *)file actions:(nullable NSArray<DBSHARINGMemberAction *> *)actions includeInherited:(nullable NSNumber *)includeInherited limit:(nullable NSNumber *)limit;
Swift
func listFileMembers(_ file: String, actions: [DBSHARINGMemberAction]?, includeInherited: NSNumber?, limit: NSNumber?) -> DBRpcTask<DBSHARINGSharedFileMembers, DBSHARINGListFileMembersError>
Parameters
file
The file for which you want to see members.
actions
The actions for which to return permissions on a member.
includeInherited
Whether to include members who only have access from a parent shared folder.
limit
Number of members to return max per query. Defaults to 100 if no limit is specified.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedFileMembers
object on success or aDBSHARINGListFileMembersError
object on failure. -
Get members of multiple files at once. The arguments to this route are more limited, and the limit on query result size per file is more strict. To customize the results more, use the individual file endpoint. Inherited users and groups are not included in the result, and permissions are not returned for this endpoint.
Declaration
Objective-C
- (nonnull DBRpcTask<NSArray<DBSHARINGListFileMembersBatchResult *> *, DBSHARINGSharingUserError *> *)listFileMembersBatch: (nonnull NSArray<NSString *> *)files;
Swift
func listFileMembersBatch(_ files: [String]) -> DBRpcTask<NSArray, DBSHARINGSharingUserError>
Parameters
files
Files for which to return members.
Return Value
Through the response callback, the caller will receive a
NSArray<DBSHARINGListFileMembersBatchResult *>
object on success or aDBSHARINGSharingUserError
object on failure. -
Get members of multiple files at once. The arguments to this route are more limited, and the limit on query result size per file is more strict. To customize the results more, use the individual file endpoint. Inherited users and groups are not included in the result, and permissions are not returned for this endpoint.
Declaration
Objective-C
- (nonnull DBRpcTask<NSArray<DBSHARINGListFileMembersBatchResult *> *, DBSHARINGSharingUserError *> *) listFileMembersBatch:(nonnull NSArray<NSString *> *)files limit:(nullable NSNumber *)limit;
Swift
func listFileMembersBatch(_ files: [String], limit: NSNumber?) -> DBRpcTask<NSArray, DBSHARINGSharingUserError>
Parameters
files
Files for which to return members.
limit
Number of members to return max per query. Defaults to 10 if no limit is specified.
Return Value
Through the response callback, the caller will receive a
NSArray<DBSHARINGListFileMembersBatchResult *>
object on success or aDBSHARINGSharingUserError
object on failure. -
Once a cursor has been retrieved from
listFileMembers
orlistFileMembersBatch
, use this to paginate through all shared file members.Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGSharedFileMembers *, DBSHARINGListFileMembersContinueError *> *) listFileMembersContinue:(nonnull NSString *)cursor;
Swift
func listFileMembersContinue(_ cursor: String) -> DBRpcTask<DBSHARINGSharedFileMembers, DBSHARINGListFileMembersContinueError>
Parameters
cursor
The cursor returned by your last call to
listFileMembers
,listFileMembersContinue
, orlistFileMembersBatch
.Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedFileMembers
object on success or aDBSHARINGListFileMembersContinueError
object on failure. -
Returns shared folder membership by its folder ID.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGSharedFolderMembers *, DBSHARINGSharedFolderAccessError *> *)listFolderMembers: (nonnull NSString *)sharedFolderId;
Swift
func listFolderMembers(_ sharedFolderId: String) -> DBRpcTask<DBSHARINGSharedFolderMembers, DBSHARINGSharedFolderAccessError>
Parameters
sharedFolderId
The ID for the shared folder.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedFolderMembers
object on success or aDBSHARINGSharedFolderAccessError
object on failure. -
Returns shared folder membership by its folder ID.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGSharedFolderMembers *, DBSHARINGSharedFolderAccessError *> *) listFolderMembers:(nonnull NSString *)sharedFolderId actions:(nullable NSArray<DBSHARINGMemberAction *> *)actions limit:(nullable NSNumber *)limit;
Swift
func listFolderMembers(_ sharedFolderId: String, actions: [DBSHARINGMemberAction]?, limit: NSNumber?) -> DBRpcTask<DBSHARINGSharedFolderMembers, DBSHARINGSharedFolderAccessError>
Parameters
sharedFolderId
The ID for the shared folder.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedFolderMembers
object on success or aDBSHARINGSharedFolderAccessError
object on failure. -
Once a cursor has been retrieved from
listFolderMembers
, use this to paginate through all shared folder members.Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGSharedFolderMembers *, DBSHARINGListFolderMembersContinueError *> *) listFolderMembersContinue:(nonnull NSString *)cursor;
Swift
func listFolderMembersContinue(_ cursor: String) -> DBRpcTask<DBSHARINGSharedFolderMembers, DBSHARINGListFolderMembersContinueError>
Parameters
cursor
The cursor returned by your last call to
listFolderMembers
orlistFolderMembersContinue
.Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedFolderMembers
object on success or aDBSHARINGListFolderMembersContinueError
object on failure. -
Return the list of all shared folders the current user has access to.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGListFoldersResult *, DBNilObject *> *)listFolders;
Swift
func listFolders() -> DBRpcTask<DBSHARINGListFoldersResult, DBNilObject>
Return Value
Through the response callback, the caller will receive a
DBSHARINGListFoldersResult
object on success or avoid
object on failure. -
Return the list of all shared folders the current user has access to.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGListFoldersResult *, DBNilObject *> *) listFolders:(nullable NSNumber *)limit actions:(nullable NSArray<DBSHARINGFolderAction *> *)actions;
Swift
func listFolders(_ limit: NSNumber?, actions: [DBSHARINGFolderAction]?) -> DBRpcTask<DBSHARINGListFoldersResult, DBNilObject>
Parameters
limit
The maximum number of results to return per request.
actions
A list of
FolderAction
s corresponding toFolderPermission
s that should appear in the response’spermissions
inDBSHARINGSharedFolderMetadata
field describing the actions the authenticated user can perform on the folder.Return Value
Through the response callback, the caller will receive a
DBSHARINGListFoldersResult
object on success or avoid
object on failure. -
Once a cursor has been retrieved from
listFolders
, use this to paginate through all shared folders. The cursor must come from a previous call tolistFolders
orlistFoldersContinue
.Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGListFoldersResult *, DBSHARINGListFoldersContinueError *> *)listFoldersContinue: (nonnull NSString *)cursor;
Swift
func listFoldersContinue(_ cursor: String) -> DBRpcTask<DBSHARINGListFoldersResult, DBSHARINGListFoldersContinueError>
Parameters
cursor
The cursor returned by the previous API call specified in the endpoint description.
Return Value
Through the response callback, the caller will receive a
DBSHARINGListFoldersResult
object on success or aDBSHARINGListFoldersContinueError
object on failure. -
Return the list of all shared folders the current user can mount or unmount.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGListFoldersResult *, DBNilObject *> *) listMountableFolders;
Swift
func listMountableFolders() -> DBRpcTask<DBSHARINGListFoldersResult, DBNilObject>
Return Value
Through the response callback, the caller will receive a
DBSHARINGListFoldersResult
object on success or avoid
object on failure. -
Return the list of all shared folders the current user can mount or unmount.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGListFoldersResult *, DBNilObject *> *) listMountableFolders:(nullable NSNumber *)limit actions:(nullable NSArray<DBSHARINGFolderAction *> *)actions;
Swift
func listMountableFolders(_ limit: NSNumber?, actions: [DBSHARINGFolderAction]?) -> DBRpcTask<DBSHARINGListFoldersResult, DBNilObject>
Parameters
limit
The maximum number of results to return per request.
actions
A list of
FolderAction
s corresponding toFolderPermission
s that should appear in the response’spermissions
inDBSHARINGSharedFolderMetadata
field describing the actions the authenticated user can perform on the folder.Return Value
Through the response callback, the caller will receive a
DBSHARINGListFoldersResult
object on success or avoid
object on failure. -
Once a cursor has been retrieved from
listMountableFolders
, use this to paginate through all mountable shared folders. The cursor must come from a previous call tolistMountableFolders
orlistMountableFoldersContinue
.Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGListFoldersResult *, DBSHARINGListFoldersContinueError *> *) listMountableFoldersContinue:(nonnull NSString *)cursor;
Swift
func listMountableFoldersContinue(_ cursor: String) -> DBRpcTask<DBSHARINGListFoldersResult, DBSHARINGListFoldersContinueError>
Parameters
cursor
The cursor returned by the previous API call specified in the endpoint description.
Return Value
Through the response callback, the caller will receive a
DBSHARINGListFoldersResult
object on success or aDBSHARINGListFoldersContinueError
object on failure. -
Returns a list of all files shared with current user. Does not include files the user has received via shared folders, and does not include unclaimed invitations.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGListFilesResult *, DBSHARINGSharingUserError *> *) listReceivedFiles;
Swift
func listReceivedFiles() -> DBRpcTask<DBSHARINGListFilesResult, DBSHARINGSharingUserError>
Return Value
Through the response callback, the caller will receive a
DBSHARINGListFilesResult
object on success or aDBSHARINGSharingUserError
object on failure. -
Returns a list of all files shared with current user. Does not include files the user has received via shared folders, and does not include unclaimed invitations.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGListFilesResult *, DBSHARINGSharingUserError *> *) listReceivedFiles:(nullable NSNumber *)limit actions:(nullable NSArray<DBSHARINGFileAction *> *)actions;
Swift
func listReceivedFiles(_ limit: NSNumber?, actions: [DBSHARINGFileAction]?) -> DBRpcTask<DBSHARINGListFilesResult, DBSHARINGSharingUserError>
Parameters
limit
Number of files to return max per query. Defaults to 100 if no limit is specified.
actions
A list of
FileAction
s corresponding toFilePermission
s that should appear in the response’spermissions
inDBSHARINGSharedFileMetadata
field describing the actions the authenticated user can perform on the file.Return Value
Through the response callback, the caller will receive a
DBSHARINGListFilesResult
object on success or aDBSHARINGSharingUserError
object on failure. -
Get more results with a cursor from
listReceivedFiles
.Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGListFilesResult *, DBSHARINGListFilesContinueError *> *) listReceivedFilesContinue:(nonnull NSString *)cursor;
Swift
func listReceivedFilesContinue(_ cursor: String) -> DBRpcTask<DBSHARINGListFilesResult, DBSHARINGListFilesContinueError>
Parameters
cursor
Cursor in
cursor
inDBSHARINGListFilesResult
.Return Value
Through the response callback, the caller will receive a
DBSHARINGListFilesResult
object on success or aDBSHARINGListFilesContinueError
object on failure. -
List shared links of this user. If no path is given, returns a list of all shared links for the current user. For members of business teams using team space and member folders, returns all shared links in the team member’s home folder unless the team space ID is specified in the request header. For more information, refer to the Namespace Guide https://www.dropbox.com/developers/reference/namespace-guide. If a non-empty path is given, returns a list of all shared links that allow access to the given path - direct links to the given path and links to parent folders of the given path. Links to parent folders can be suppressed by setting direct_only to true.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGListSharedLinksResult *, DBSHARINGListSharedLinksError *> *)listSharedLinks;
Swift
func listSharedLinks() -> DBRpcTask<DBSHARINGListSharedLinksResult, DBSHARINGListSharedLinksError>
Return Value
Through the response callback, the caller will receive a
DBSHARINGListSharedLinksResult
object on success or aDBSHARINGListSharedLinksError
object on failure. -
List shared links of this user. If no path is given, returns a list of all shared links for the current user. For members of business teams using team space and member folders, returns all shared links in the team member’s home folder unless the team space ID is specified in the request header. For more information, refer to the Namespace Guide https://www.dropbox.com/developers/reference/namespace-guide. If a non-empty path is given, returns a list of all shared links that allow access to the given path - direct links to the given path and links to parent folders of the given path. Links to parent folders can be suppressed by setting direct_only to true.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGListSharedLinksResult *, DBSHARINGListSharedLinksError *> *) listSharedLinks:(nullable NSString *)path cursor:(nullable NSString *)cursor directOnly:(nullable NSNumber *)directOnly;
Swift
func listSharedLinks(_ path: String?, cursor: String?, directOnly: NSNumber?) -> DBRpcTask<DBSHARINGListSharedLinksResult, DBSHARINGListSharedLinksError>
Parameters
path
See
listSharedLinks
description.cursor
The cursor returned by your last call to
listSharedLinks
.directOnly
See
listSharedLinks
description.Return Value
Through the response callback, the caller will receive a
DBSHARINGListSharedLinksResult
object on success or aDBSHARINGListSharedLinksError
object on failure. -
Modify the shared link’s settings. If the requested visibility conflict with the shared links policy of the team or the shared folder (in case the linked file is part of a shared folder) then the
resolvedVisibility
inDBSHARINGLinkPermissions
of the returned SharedLinkMetadata will reflect the actual visibility of the shared link and therequestedVisibility
inDBSHARINGLinkPermissions
will reflect the requested visibility.Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGSharedLinkMetadata *, DBSHARINGModifySharedLinkSettingsError *> *) modifySharedLinkSettings:(nonnull NSString *)url settings:(nonnull DBSHARINGSharedLinkSettings *)settings;
Swift
func modifySharedLinkSettings(_ url: String, settings: DBSHARINGSharedLinkSettings) -> DBRpcTask<DBSHARINGSharedLinkMetadata, DBSHARINGModifySharedLinkSettingsError>
Parameters
url
URL of the shared link to change its settings.
settings
Set of settings for the shared link.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedLinkMetadata
object on success or aDBSHARINGModifySharedLinkSettingsError
object on failure. -
Modify the shared link’s settings. If the requested visibility conflict with the shared links policy of the team or the shared folder (in case the linked file is part of a shared folder) then the
resolvedVisibility
inDBSHARINGLinkPermissions
of the returned SharedLinkMetadata will reflect the actual visibility of the shared link and therequestedVisibility
inDBSHARINGLinkPermissions
will reflect the requested visibility.Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGSharedLinkMetadata *, DBSHARINGModifySharedLinkSettingsError *> *) modifySharedLinkSettings:(nonnull NSString *)url settings:(nonnull DBSHARINGSharedLinkSettings *)settings removeExpiration:(nullable NSNumber *)removeExpiration;
Swift
func modifySharedLinkSettings(_ url: String, settings: DBSHARINGSharedLinkSettings, removeExpiration: NSNumber?) -> DBRpcTask<DBSHARINGSharedLinkMetadata, DBSHARINGModifySharedLinkSettingsError>
Parameters
url
URL of the shared link to change its settings.
settings
Set of settings for the shared link.
removeExpiration
If set to true, removes the expiration of the shared link.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedLinkMetadata
object on success or aDBSHARINGModifySharedLinkSettingsError
object on failure. -
The current user mounts the designated folder. Mount a shared folder for a user after they have been added as a member. Once mounted, the shared folder will appear in their Dropbox.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGSharedFolderMetadata *, DBSHARINGMountFolderError *> *)mountFolder: (nonnull NSString *)sharedFolderId;
Swift
func mountFolder(_ sharedFolderId: String) -> DBRpcTask<DBSHARINGSharedFolderMetadata, DBSHARINGMountFolderError>
Parameters
sharedFolderId
The ID of the shared folder to mount.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedFolderMetadata
object on success or aDBSHARINGMountFolderError
object on failure. -
The current user relinquishes their membership in the designated file. Note that the current user may still have inherited access to this file through the parent folder.
Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBSHARINGRelinquishFileMembershipError *> *) relinquishFileMembership:(nonnull NSString *)file;
Swift
func relinquishFileMembership(_ file: String) -> DBRpcTask<DBNilObject, DBSHARINGRelinquishFileMembershipError>
Parameters
file
The path or id for the file.
Return Value
Through the response callback, the caller will receive a
void
object on success or aDBSHARINGRelinquishFileMembershipError
object on failure. -
The current user relinquishes their membership in the designated shared folder and will no longer have access to the folder. A folder owner cannot relinquish membership in their own folder. This will run synchronously if leave_a_copy is false, and asynchronously if leave_a_copy is true.
Declaration
Objective-C
- (nonnull DBRpcTask<DBASYNCLaunchEmptyResult *, DBSHARINGRelinquishFolderMembershipError *> *) relinquishFolderMembership:(nonnull NSString *)sharedFolderId;
Swift
func relinquishFolderMembership(_ sharedFolderId: String) -> DBRpcTask<DBASYNCLaunchEmptyResult, DBSHARINGRelinquishFolderMembershipError>
Parameters
sharedFolderId
The ID for the shared folder.
Return Value
Through the response callback, the caller will receive a
DBASYNCLaunchEmptyResult
object on success or aDBSHARINGRelinquishFolderMembershipError
object on failure. -
The current user relinquishes their membership in the designated shared folder and will no longer have access to the folder. A folder owner cannot relinquish membership in their own folder. This will run synchronously if leave_a_copy is false, and asynchronously if leave_a_copy is true.
Declaration
Objective-C
- (nonnull DBRpcTask<DBASYNCLaunchEmptyResult *, DBSHARINGRelinquishFolderMembershipError *> *) relinquishFolderMembership:(nonnull NSString *)sharedFolderId leaveACopy:(nullable NSNumber *)leaveACopy;
Swift
func relinquishFolderMembership(_ sharedFolderId: String, leaveACopy: NSNumber?) -> DBRpcTask<DBASYNCLaunchEmptyResult, DBSHARINGRelinquishFolderMembershipError>
Parameters
sharedFolderId
The ID for the shared folder.
leaveACopy
Keep a copy of the folder’s contents upon relinquishing membership. This must be set to false when the folder is within a team folder or another shared folder.
Return Value
Through the response callback, the caller will receive a
DBASYNCLaunchEmptyResult
object on success or aDBSHARINGRelinquishFolderMembershipError
object on failure. -
Deprecated
removeFileMember is deprecated. Use removeFileMember2.
DEPRECATED: Identical to remove_file_member_2 but with less information returned.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGFileMemberActionIndividualResult *, DBSHARINGRemoveFileMemberError *> *) removeFileMember:(nonnull NSString *)file member:(nonnull DBSHARINGMemberSelector *)member;
Swift
func removeFileMember(_ file: String, member: DBSHARINGMemberSelector) -> DBRpcTask<DBSHARINGFileMemberActionIndividualResult, DBSHARINGRemoveFileMemberError>
Parameters
file
File from which to remove members.
member
Member to remove from this file. Note that even if an email is specified, it may result in the removal of a user (not an invitee) if the user’s main account corresponds to that email address.
Return Value
Through the response callback, the caller will receive a
DBSHARINGFileMemberActionIndividualResult
object on success or aDBSHARINGRemoveFileMemberError
object on failure. -
Removes a specified member from the file.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGFileMemberRemoveActionResult *, DBSHARINGRemoveFileMemberError *> *) removeFileMember2:(nonnull NSString *)file member:(nonnull DBSHARINGMemberSelector *)member;
Swift
func removeFileMember2(_ file: String, member: DBSHARINGMemberSelector) -> DBRpcTask<DBSHARINGFileMemberRemoveActionResult, DBSHARINGRemoveFileMemberError>
Parameters
file
File from which to remove members.
member
Member to remove from this file. Note that even if an email is specified, it may result in the removal of a user (not an invitee) if the user’s main account corresponds to that email address.
Return Value
Through the response callback, the caller will receive a
DBSHARINGFileMemberRemoveActionResult
object on success or aDBSHARINGRemoveFileMemberError
object on failure. -
Allows an owner or editor (if the ACL update policy allows) of a shared folder to remove another member.
Declaration
Objective-C
- (nonnull DBRpcTask<DBASYNCLaunchResultBase *, DBSHARINGRemoveFolderMemberError *> *) removeFolderMember:(nonnull NSString *)sharedFolderId member:(nonnull DBSHARINGMemberSelector *)member leaveACopy:(nonnull NSNumber *)leaveACopy;
Swift
func removeFolderMember(_ sharedFolderId: String, member: DBSHARINGMemberSelector, leaveACopy: NSNumber) -> DBRpcTask<DBASYNCLaunchResultBase, DBSHARINGRemoveFolderMemberError>
Parameters
sharedFolderId
The ID for the shared folder.
member
The member to remove from the folder.
leaveACopy
If true, the removed user will keep their copy of the folder after it’s unshared, assuming it was mounted. Otherwise, it will be removed from their Dropbox. This must be set to false when removing a group, or when the folder is within a team folder or another shared folder.
Return Value
Through the response callback, the caller will receive a
DBASYNCLaunchResultBase
object on success or aDBSHARINGRemoveFolderMemberError
object on failure. -
Revoke a shared link. Note that even after revoking a shared link to a file, the file may be accessible if there are shared links leading to any of the file parent folders. To list all shared links that enable access to a specific file, you can use the
listSharedLinks
with the file as thepath
inDBSHARINGListSharedLinksArg
argument.Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBSHARINGRevokeSharedLinkError *> *) revokeSharedLink:(nonnull NSString *)url;
Swift
func revokeSharedLink(_ url: String) -> DBRpcTask<DBNilObject, DBSHARINGRevokeSharedLinkError>
Parameters
url
URL of the shared link.
Return Value
Through the response callback, the caller will receive a
void
object on success or aDBSHARINGRevokeSharedLinkError
object on failure. -
Change the inheritance policy of an existing Shared Folder. Only permitted for shared folders in a shared team root. If a
asyncJobId
inDBSHARINGShareFolderLaunch
is returned, you’ll need to callcheckShareJobStatus
until the action completes to get the metadata for the folder.Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGShareFolderLaunch *, DBSHARINGSetAccessInheritanceError *> *) setAccessInheritance:(nonnull NSString *)sharedFolderId;
Swift
func setAccessInheritance(_ sharedFolderId: String) -> DBRpcTask<DBSHARINGShareFolderLaunch, DBSHARINGSetAccessInheritanceError>
Parameters
sharedFolderId
The ID for the shared folder.
Return Value
Through the response callback, the caller will receive a
DBSHARINGShareFolderLaunch
object on success or aDBSHARINGSetAccessInheritanceError
object on failure. -
Change the inheritance policy of an existing Shared Folder. Only permitted for shared folders in a shared team root. If a
asyncJobId
inDBSHARINGShareFolderLaunch
is returned, you’ll need to callcheckShareJobStatus
until the action completes to get the metadata for the folder.Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGShareFolderLaunch *, DBSHARINGSetAccessInheritanceError *> *) setAccessInheritance:(nonnull NSString *)sharedFolderId accessInheritance: (nullable DBSHARINGAccessInheritance *)accessInheritance;
Swift
func setAccessInheritance(_ sharedFolderId: String, accessInheritance: DBSHARINGAccessInheritance?) -> DBRpcTask<DBSHARINGShareFolderLaunch, DBSHARINGSetAccessInheritanceError>
Parameters
accessInheritance
The access inheritance settings for the folder.
sharedFolderId
The ID for the shared folder.
Return Value
Through the response callback, the caller will receive a
DBSHARINGShareFolderLaunch
object on success or aDBSHARINGSetAccessInheritanceError
object on failure. -
Share a folder with collaborators. Most sharing will be completed synchronously. Large folders will be completed asynchronously. To make testing the async case repeatable, set
ShareFolderArg.force_async
. If aasyncJobId
inDBSHARINGShareFolderLaunch
is returned, you’ll need to callcheckShareJobStatus
until the action completes to get the metadata for the folder.Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGShareFolderLaunch *, DBSHARINGShareFolderError *> *)shareFolder:(nonnull NSString *)path;
Swift
func shareFolder(_ path: String) -> DBRpcTask<DBSHARINGShareFolderLaunch, DBSHARINGShareFolderError>
Return Value
Through the response callback, the caller will receive a
DBSHARINGShareFolderLaunch
object on success or aDBSHARINGShareFolderError
object on failure. -
-shareFolder:
aclUpdatePolicy: forceAsync: memberPolicy: sharedLinkPolicy: viewerInfoPolicy: accessInheritance: actions: linkSettings: Share a folder with collaborators. Most sharing will be completed synchronously. Large folders will be completed asynchronously. To make testing the async case repeatable, set
ShareFolderArg.force_async
. If aasyncJobId
inDBSHARINGShareFolderLaunch
is returned, you’ll need to callcheckShareJobStatus
until the action completes to get the metadata for the folder.Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGShareFolderLaunch *, DBSHARINGShareFolderError *> *)shareFolder:(nonnull NSString *)path aclUpdatePolicy:(nullable DBSHARINGAclUpdatePolicy *)aclUpdatePolicy forceAsync:(nullable NSNumber *)forceAsync memberPolicy:(nullable DBSHARINGMemberPolicy *)memberPolicy sharedLinkPolicy:(nullable DBSHARINGSharedLinkPolicy *)sharedLinkPolicy viewerInfoPolicy:(nullable DBSHARINGViewerInfoPolicy *)viewerInfoPolicy accessInheritance:(nullable DBSHARINGAccessInheritance *)accessInheritance actions:(nullable NSArray<DBSHARINGFolderAction *> *)actions linkSettings:(nullable DBSHARINGLinkSettings *)linkSettings;
Swift
func shareFolder(_ path: String, aclUpdatePolicy: DBSHARINGAclUpdatePolicy?, forceAsync: NSNumber?, memberPolicy: DBSHARINGMemberPolicy?, sharedLinkPolicy: DBSHARINGSharedLinkPolicy?, viewerInfoPolicy: DBSHARINGViewerInfoPolicy?, accessInheritance: DBSHARINGAccessInheritance?, actions: [DBSHARINGFolderAction]?, linkSettings: DBSHARINGLinkSettings?) -> DBRpcTask<DBSHARINGShareFolderLaunch, DBSHARINGShareFolderError>
Parameters
actions
A list of
FolderAction
s corresponding toFolderPermission
s that should appear in the response’spermissions
inDBSHARINGSharedFolderMetadata
field describing the actions the authenticated user can perform on the folder.linkSettings
Settings on the link for this folder.
Return Value
Through the response callback, the caller will receive a
DBSHARINGShareFolderLaunch
object on success or aDBSHARINGShareFolderError
object on failure. -
Transfer ownership of a shared folder to a member of the shared folder. User must have
owner
inDBSHARINGAccessLevel
access to the shared folder to perform a transfer.Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBSHARINGTransferFolderError *> *) transferFolder:(nonnull NSString *)sharedFolderId toDropboxId:(nonnull NSString *)toDropboxId;
Swift
func transferFolder(_ sharedFolderId: String, toDropboxId: String) -> DBRpcTask<DBNilObject, DBSHARINGTransferFolderError>
Parameters
sharedFolderId
The ID for the shared folder.
toDropboxId
A account or team member ID to transfer ownership to.
Return Value
Through the response callback, the caller will receive a
void
object on success or aDBSHARINGTransferFolderError
object on failure. -
The current user unmounts the designated folder. They can re-mount the folder at a later time using
mountFolder
.Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBSHARINGUnmountFolderError *> *) unmountFolder:(nonnull NSString *)sharedFolderId;
Swift
func unmountFolder(_ sharedFolderId: String) -> DBRpcTask<DBNilObject, DBSHARINGUnmountFolderError>
Parameters
sharedFolderId
The ID for the shared folder.
Return Value
Through the response callback, the caller will receive a
void
object on success or aDBSHARINGUnmountFolderError
object on failure. -
Remove all members from this file. Does not remove inherited members.
Declaration
Objective-C
- (nonnull DBRpcTask<DBNilObject *, DBSHARINGUnshareFileError *> *)unshareFile: (nonnull NSString *)file;
Swift
func unshareFile(_ file: String) -> DBRpcTask<DBNilObject, DBSHARINGUnshareFileError>
Parameters
file
The file to unshare.
Return Value
Through the response callback, the caller will receive a
void
object on success or aDBSHARINGUnshareFileError
object on failure. -
Allows a shared folder owner to unshare the folder. You’ll need to call
checkJobStatus
to determine if the action has completed successfully.Declaration
Objective-C
- (nonnull DBRpcTask<DBASYNCLaunchEmptyResult *, DBSHARINGUnshareFolderError *> *)unshareFolder:(nonnull NSString *)sharedFolderId;
Swift
func unshareFolder(_ sharedFolderId: String) -> DBRpcTask<DBASYNCLaunchEmptyResult, DBSHARINGUnshareFolderError>
Parameters
sharedFolderId
The ID for the shared folder.
Return Value
Through the response callback, the caller will receive a
DBASYNCLaunchEmptyResult
object on success or aDBSHARINGUnshareFolderError
object on failure. -
Allows a shared folder owner to unshare the folder. You’ll need to call
checkJobStatus
to determine if the action has completed successfully.Declaration
Objective-C
- (nonnull DBRpcTask<DBASYNCLaunchEmptyResult *, DBSHARINGUnshareFolderError *> *)unshareFolder:(nonnull NSString *)sharedFolderId leaveACopy:(nullable NSNumber *)leaveACopy;
Swift
func unshareFolder(_ sharedFolderId: String, leaveACopy: NSNumber?) -> DBRpcTask<DBASYNCLaunchEmptyResult, DBSHARINGUnshareFolderError>
Parameters
sharedFolderId
The ID for the shared folder.
leaveACopy
If true, members of this shared folder will get a copy of this folder after it’s unshared. Otherwise, it will be removed from their Dropbox. The current user, who is an owner, will always retain their copy.
Return Value
Through the response callback, the caller will receive a
DBASYNCLaunchEmptyResult
object on success or aDBSHARINGUnshareFolderError
object on failure. -
Changes a member’s access on a shared file.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGMemberAccessLevelResult *, DBSHARINGFileMemberActionError *> *) updateFileMember:(nonnull NSString *)file member:(nonnull DBSHARINGMemberSelector *)member accessLevel:(nonnull DBSHARINGAccessLevel *)accessLevel;
Swift
func updateFileMember(_ file: String, member: DBSHARINGMemberSelector, accessLevel: DBSHARINGAccessLevel) -> DBRpcTask<DBSHARINGMemberAccessLevelResult, DBSHARINGFileMemberActionError>
Parameters
file
File for which we are changing a member’s access.
member
The member whose access we are changing.
accessLevel
The new access level for the member.
Return Value
Through the response callback, the caller will receive a
DBSHARINGMemberAccessLevelResult
object on success or aDBSHARINGFileMemberActionError
object on failure. -
Allows an owner or editor of a shared folder to update another member’s permissions.
Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGMemberAccessLevelResult *, DBSHARINGUpdateFolderMemberError *> *) updateFolderMember:(nonnull NSString *)sharedFolderId member:(nonnull DBSHARINGMemberSelector *)member accessLevel:(nonnull DBSHARINGAccessLevel *)accessLevel;
Swift
func updateFolderMember(_ sharedFolderId: String, member: DBSHARINGMemberSelector, accessLevel: DBSHARINGAccessLevel) -> DBRpcTask<DBSHARINGMemberAccessLevelResult, DBSHARINGUpdateFolderMemberError>
Parameters
sharedFolderId
The ID for the shared folder.
member
The member of the shared folder to update. Only the
dropboxId
inDBSHARINGMemberSelector
may be set at this time.accessLevel
The new access level for member.
owner
inDBSHARINGAccessLevel
is disallowed.Return Value
Through the response callback, the caller will receive a
DBSHARINGMemberAccessLevelResult
object on success or aDBSHARINGUpdateFolderMemberError
object on failure. -
Update the sharing policies for a shared folder. User must have
owner
inDBSHARINGAccessLevel
access to the shared folder to update its policies.Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGSharedFolderMetadata *, DBSHARINGUpdateFolderPolicyError *> *)updateFolderPolicy: (nonnull NSString *)sharedFolderId;
Swift
func updateFolderPolicy(_ sharedFolderId: String) -> DBRpcTask<DBSHARINGSharedFolderMetadata, DBSHARINGUpdateFolderPolicyError>
Parameters
sharedFolderId
The ID for the shared folder.
Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedFolderMetadata
object on success or aDBSHARINGUpdateFolderPolicyError
object on failure. -
-updateFolderPolicy:
memberPolicy: aclUpdatePolicy: viewerInfoPolicy: sharedLinkPolicy: linkSettings: actions: Update the sharing policies for a shared folder. User must have
owner
inDBSHARINGAccessLevel
access to the shared folder to update its policies.Declaration
Objective-C
- (nonnull DBRpcTask<DBSHARINGSharedFolderMetadata *, DBSHARINGUpdateFolderPolicyError *> *) updateFolderPolicy:(nonnull NSString *)sharedFolderId memberPolicy:(nullable DBSHARINGMemberPolicy *)memberPolicy aclUpdatePolicy:(nullable DBSHARINGAclUpdatePolicy *)aclUpdatePolicy viewerInfoPolicy:(nullable DBSHARINGViewerInfoPolicy *)viewerInfoPolicy sharedLinkPolicy:(nullable DBSHARINGSharedLinkPolicy *)sharedLinkPolicy linkSettings:(nullable DBSHARINGLinkSettings *)linkSettings actions:(nullable NSArray<DBSHARINGFolderAction *> *)actions;
Swift
func updateFolderPolicy(_ sharedFolderId: String, memberPolicy: DBSHARINGMemberPolicy?, aclUpdatePolicy: DBSHARINGAclUpdatePolicy?, viewerInfoPolicy: DBSHARINGViewerInfoPolicy?, sharedLinkPolicy: DBSHARINGSharedLinkPolicy?, linkSettings: DBSHARINGLinkSettings?, actions: [DBSHARINGFolderAction]?) -> DBRpcTask<DBSHARINGSharedFolderMetadata, DBSHARINGUpdateFolderPolicyError>
Parameters
sharedFolderId
The ID for the shared folder.
memberPolicy
Who can be a member of this shared folder. Only applicable if the current user is on a team.
aclUpdatePolicy
Who can add and remove members of this shared folder.
viewerInfoPolicy
Who can enable/disable viewer info for this shared folder.
sharedLinkPolicy
The policy to apply to shared links created for content inside this shared folder. The current user must be on a team to set this policy to
members
inDBSHARINGSharedLinkPolicy
.linkSettings
Settings on the link for this folder.
actions
A list of
FolderAction
s corresponding toFolderPermission
s that should appear in the response’spermissions
inDBSHARINGSharedFolderMetadata
field describing the actions the authenticated user can perform on the folder.Return Value
Through the response callback, the caller will receive a
DBSHARINGSharedFolderMetadata
object on success or aDBSHARINGUpdateFolderPolicyError
object on failure.