Dropbox

Links

    Dropbox API

    Getting access, Developing, Testing

    Back to Dropbox

    Sharing - Create Shared Link

    Create a shared link. If a shared link already exists for the given path, that link is returned. Note that in the returned :type:PathLinkMetadata, the :field:PathLinkMetadata.url field is the shortened URL if :field:CreateSharedLinkArg.short_url argument is set to :val:true. 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 :route:revoke_shared_link.

    Input

    type: object properties: data: type: object description: > path: The path to share. short_url: Whether to return a shortened URL. pending_upload: If it's okay to share a path that does not yet exist, set this to either :field:`PendingUploadMode.file` or :field:`PendingUploadMode.folder` to indicate whether to assume it's a file or folder. properties: path: type: string description: The path to share. pending_upload: type: object description: > Flag to indicate pending upload default (for linking to not-yet-existing paths). file: Assume pending uploads are files. folder: Assume pending uploads are folders. properties: .tag: title: Choice of PendingUploadMode type: string enum: - file - folder short_url: type: boolean description: Whether to return a shortened URL. title: Data

    Output

    type: object description: | Metadata for a path-based shared link. url: URL of the shared link. visibility: Who can access the link. path: Path in user's Dropbox. expires: Expiration time, if set. By default the link won't expire. properties: url: type: string description: URL of the shared link. path: type: string description: Path in user's Dropbox. expires: type: string description: Expiration time, if set. By default the link won't expire. visibility: type: object description: > Who can access a shared link. The most open visibility is :field:`public`. The default depends on many aspects, such as team and user preferences and shared folder settings. public: Anyone who has received the link can access it. No login required. team_only: Only members of the same team can access the link. Login is required. password: A link-specific password is required to access the link. Login is not required. team_and_password: Only members of the same team who have the link-specific password can access the link. shared_folder_only: Only members of the shared folder containing the linked file can access the link. Login is required. other: None properties: .tag: title: Choice of Visibility type: string enum: - public - team_only - password - team_and_password - shared_folder_only - other