Class: Dropbox

Dropbox

The Dropbox SDK class that provides methods to read, write and create files or folders in a user's Dropbox.

new Dropbox(options)

Parameters:
Name Type Description
options Object
Properties
Name Type Argument Description
accessToken String <optional>
An access token for making authenticated requests.
clientId String <optional>
The client id for your app. Used to create authentication URL.
selectUser String <optional>
Select user is only used by DropboxTeam. It specifies which user the team access token should be acting as.

Extends

Methods


authenticateWithCordova(successCallback, errorCallback)

An authentication process that works with cordova applications.
Parameters:
Name Type Description
successCallback successCallback
errorCallback errorCallback
Inherited From:

authTokenFromOauth1(arg)

Creates an OAuth 2.0 access token from the supplied OAuth 1.0 access token.
Parameters:
Name Type Description
arg AuthTokenFromOAuth1Arg The request parameters.
Returns:
Type
Promise.<AuthTokenFromOAuth1Result, Error.<AuthTokenFromOAuth1Error>>

authTokenRevoke(arg)

Disables the access token used to authenticate the call.
Parameters:
Name Type Description
arg void The request parameters.
Returns:
Type
Promise.<void, Error.<void>>

filePropertiesPropertiesAdd(arg)

Add property groups to a Dropbox file. See templates/add_for_user or templates/add_for_team to create new templates.
Parameters:
Name Type Description
arg FilePropertiesAddPropertiesArg The request parameters.
Returns:
Type
Promise.<void, Error.<FilePropertiesAddPropertiesError>>

filePropertiesPropertiesOverwrite(arg)

Overwrite property groups associated with a file. This endpoint should be used instead of properties/update when property groups are being updated via a "snapshot" instead of via a "delta". In other words, this endpoint will delete all omitted fields from a property group, whereas properties/update will only delete fields that are explicitly marked for deletion.
Parameters:
Name Type Description
arg FilePropertiesOverwritePropertyGroupArg The request parameters.
Returns:
Type
Promise.<void, Error.<FilePropertiesInvalidPropertyGroupError>>

filePropertiesPropertiesRemove(arg)

Remove the specified property group from the file. To remove specific property field key value pairs, see properties/update. To update a template, see templates/update_for_user or templates/update_for_team. Templates can't be removed once created.
Parameters:
Name Type Description
arg FilePropertiesRemovePropertiesArg The request parameters.
Returns:
Type
Promise.<void, Error.<FilePropertiesRemovePropertiesError>>

filePropertiesPropertiesSearch(arg)

Search across property templates for particular property field values.
Parameters:
Name Type Description
arg FilePropertiesPropertiesSearchArg The request parameters.
Returns:
Type
Promise.<FilePropertiesPropertiesSearchResult, Error.<FilePropertiesPropertiesSearchError>>

filePropertiesPropertiesUpdate(arg)

Add, update or remove properties associated with the supplied file and templates. This endpoint should be used instead of properties/overwrite when property groups are being updated via a "delta" instead of via a "snapshot" . In other words, this endpoint will not delete any omitted fields from a property group, whereas properties/overwrite will delete any fields that are omitted from a property group.
Parameters:
Name Type Description
arg FilePropertiesUpdatePropertiesArg The request parameters.
Returns:
Type
Promise.<void, Error.<FilePropertiesUpdatePropertiesError>>

filePropertiesTemplatesAddForTeam(arg)

Add a template associated with a team. See properties/add to add properties to a file or folder.
Parameters:
Name Type Description
arg FilePropertiesAddTemplateArg The request parameters.
Returns:
Type
Promise.<FilePropertiesAddTemplateResult, Error.<FilePropertiesModifyTemplateError>>

filePropertiesTemplatesAddForUser(arg)

Add a template associated with a user. See properties/add to add properties to a file. This endpoint can't be called on a team member or admin's behalf.
Parameters:
Name Type Description
arg FilePropertiesAddTemplateArg The request parameters.
Returns:
Type
Promise.<FilePropertiesAddTemplateResult, Error.<FilePropertiesModifyTemplateError>>

filePropertiesTemplatesGetForTeam(arg)

Get the schema for a specified template.
Parameters:
Name Type Description
arg FilePropertiesGetTemplateArg The request parameters.
Returns:
Type
Promise.<FilePropertiesGetTemplateResult, Error.<FilePropertiesTemplateError>>

filePropertiesTemplatesGetForUser(arg)

Get the schema for a specified template. This endpoint can't be called on a team member or admin's behalf.
Parameters:
Name Type Description
arg FilePropertiesGetTemplateArg The request parameters.
Returns:
Type
Promise.<FilePropertiesGetTemplateResult, Error.<FilePropertiesTemplateError>>

filePropertiesTemplatesListForTeam(arg)

Get the template identifiers for a team. To get the schema of each template use templates/get_for_team.
Parameters:
Name Type Description
arg void The request parameters.
Returns:
Type
Promise.<FilePropertiesListTemplateResult, Error.<FilePropertiesTemplateError>>

filePropertiesTemplatesListForUser(arg)

Get the template identifiers for a team. To get the schema of each template use templates/get_for_user. This endpoint can't be called on a team member or admin's behalf.
Parameters:
Name Type Description
arg void The request parameters.
Returns:
Type
Promise.<FilePropertiesListTemplateResult, Error.<FilePropertiesTemplateError>>

filePropertiesTemplatesUpdateForTeam(arg)

Update a template associated with a team. This route can update the template name, the template description and add optional properties to templates.
Parameters:
Name Type Description
arg FilePropertiesUpdateTemplateArg The request parameters.
Returns:
Type
Promise.<FilePropertiesUpdateTemplateResult, Error.<FilePropertiesModifyTemplateError>>

filePropertiesTemplatesUpdateForUser(arg)

Update a template associated with a user. This route can update the template name, the template description and add optional properties to templates. This endpoint can't be called on a team member or admin's behalf.
Parameters:
Name Type Description
arg FilePropertiesUpdateTemplateArg The request parameters.
Returns:
Type
Promise.<FilePropertiesUpdateTemplateResult, Error.<FilePropertiesModifyTemplateError>>

fileRequestsCreate(arg)

Creates a file request for this user.
Parameters:
Name Type Description
arg FileRequestsCreateFileRequestArgs The request parameters.
Returns:
Type
Promise.<FileRequestsFileRequest, Error.<FileRequestsCreateFileRequestError>>

fileRequestsGet(arg)

Returns the specified file request.
Parameters:
Name Type Description
arg FileRequestsGetFileRequestArgs The request parameters.
Returns:
Type
Promise.<FileRequestsFileRequest, Error.<FileRequestsGetFileRequestError>>

fileRequestsList(arg)

Returns a list of file requests owned by this user. For apps with the app folder permission, this will only return file requests with destinations in the app folder.
Parameters:
Name Type Description
arg void The request parameters.
Returns:
Type
Promise.<FileRequestsListFileRequestsResult, Error.<FileRequestsListFileRequestsError>>

fileRequestsUpdate(arg)

Update a file request.
Parameters:
Name Type Description
arg FileRequestsUpdateFileRequestArgs The request parameters.
Returns:
Type
Promise.<FileRequestsFileRequest, Error.<FileRequestsUpdateFileRequestError>>

filesAlphaGetMetadata(arg)

Returns the metadata for a file or folder. This is an alpha endpoint compatible with the properties API. Note: Metadata for the root folder is unsupported.
Parameters:
Name Type Description
arg FilesAlphaGetMetadataArg The request parameters.
Returns:
Type
Promise.<(FilesFileMetadata|FilesFolderMetadata|FilesDeletedMetadata), Error.<FilesAlphaGetMetadataError>>

filesAlphaUpload(arg)

Create a new file with the contents provided in the request. Note that this endpoint is part of the properties API alpha and is slightly different from upload. Do not use this to upload a file larger than 150 MB. Instead, create an upload session with upload_session/start.
Parameters:
Name Type Description
arg FilesCommitInfoWithProperties The request parameters.
Returns:
Type
Promise.<FilesFileMetadata, Error.<FilesUploadErrorWithProperties>>

filesCopy(arg)

Copy a file or folder to a different location in the user's Dropbox. If the source path is a folder all its contents will be copied.
Parameters:
Name Type Description
arg FilesRelocationArg The request parameters.
Deprecated:
  • Yes
Returns:
Type
Promise.<(FilesFileMetadata|FilesFolderMetadata|FilesDeletedMetadata), Error.<FilesRelocationError>>

filesCopyBatch(arg)

Copy multiple files or folders to different locations at once in the user's Dropbox. If RelocationBatchArg.allow_shared_folder is false, this route is atomic. If on entry failes, the whole transaction will abort. If RelocationBatchArg.allow_shared_folder is true, not atomicity is guaranteed, but you will be able to copy the contents of shared folders to new locations. This route will return job ID immediately and do the async copy job in background. Please use copy_batch/check to check the job status.
Parameters:
Name Type Description
arg FilesRelocationBatchArg The request parameters.
Returns:
Type
Promise.<FilesRelocationBatchLaunch, Error.<void>>

filesCopyBatchCheck(arg)

Returns the status of an asynchronous job for copy_batch. If success, it returns list of results for each entry.
Parameters:
Name Type Description
arg AsyncPollArg The request parameters.
Returns:
Type
Promise.<FilesRelocationBatchJobStatus, Error.<AsyncPollError>>

filesCopyReferenceGet(arg)

Get a copy reference to a file or folder. This reference string can be used to save that file or folder to another user's Dropbox by passing it to copy_reference/save.
Parameters:
Name Type Description
arg FilesGetCopyReferenceArg The request parameters.
Returns:
Type
Promise.<FilesGetCopyReferenceResult, Error.<FilesGetCopyReferenceError>>

filesCopyReferenceSave(arg)

Save a copy reference returned by copy_reference/get to the user's Dropbox.
Parameters:
Name Type Description
arg FilesSaveCopyReferenceArg The request parameters.
Returns:
Type
Promise.<FilesSaveCopyReferenceResult, Error.<FilesSaveCopyReferenceError>>

filesCopyV2(arg)

Copy a file or folder to a different location in the user's Dropbox. If the source path is a folder all its contents will be copied.
Parameters:
Name Type Description
arg FilesRelocationArg The request parameters.
Returns:
Type
Promise.<FilesRelocationResult, Error.<FilesRelocationError>>

filesCreateFolder(arg)

Create a folder at a given path.
Parameters:
Name Type Description
arg FilesCreateFolderArg The request parameters.
Deprecated:
  • Yes
Returns:
Type
Promise.<FilesFolderMetadata, Error.<FilesCreateFolderError>>

filesCreateFolderV2(arg)

Create a folder at a given path.
Parameters:
Name Type Description
arg FilesCreateFolderArg The request parameters.
Returns:
Type
Promise.<FilesCreateFolderResult, Error.<FilesCreateFolderError>>

filesDelete(arg)

Delete the file or folder at a given path. If the path is a folder, all its contents will be deleted too. A successful response indicates that the file or folder was deleted. The returned metadata will be the corresponding FileMetadata or FolderMetadata for the item at time of deletion, and not a DeletedMetadata object.
Parameters:
Name Type Description
arg FilesDeleteArg The request parameters.
Deprecated:
  • Yes
Returns:
Type
Promise.<(FilesFileMetadata|FilesFolderMetadata|FilesDeletedMetadata), Error.<FilesDeleteError>>

filesDeleteBatch(arg)

Delete multiple files/folders at once. This route is asynchronous, which returns a job ID immediately and runs the delete batch asynchronously. Use delete_batch/check to check the job status.
Parameters:
Name Type Description
arg FilesDeleteBatchArg The request parameters.
Returns:
Type
Promise.<FilesDeleteBatchLaunch, Error.<void>>

filesDeleteBatchCheck(arg)

Returns the status of an asynchronous job for delete_batch. If success, it returns list of result for each entry.
Parameters:
Name Type Description
arg AsyncPollArg The request parameters.
Returns:
Type
Promise.<FilesDeleteBatchJobStatus, Error.<AsyncPollError>>

filesDeleteV2(arg)

Delete the file or folder at a given path. If the path is a folder, all its contents will be deleted too. A successful response indicates that the file or folder was deleted. The returned metadata will be the corresponding FileMetadata or FolderMetadata for the item at time of deletion, and not a DeletedMetadata object.
Parameters:
Name Type Description
arg FilesDeleteArg The request parameters.
Returns:
Type
Promise.<FilesDeleteResult, Error.<FilesDeleteError>>

filesDownload(arg)

Download a file from a user's Dropbox.
Parameters:
Name Type Description
arg FilesDownloadArg The request parameters.
Returns:
Type
Promise.<FilesFileMetadata, Error.<FilesDownloadError>>

filesGetMetadata(arg)

Returns the metadata for a file or folder. Note: Metadata for the root folder is unsupported.
Parameters:
Name Type Description
arg FilesGetMetadataArg The request parameters.
Returns:
Type
Promise.<(FilesFileMetadata|FilesFolderMetadata|FilesDeletedMetadata), Error.<FilesGetMetadataError>>

filesGetPreview(arg)

Get a preview for a file. Currently, PDF previews are generated for files with the following extensions: .ai, .doc, .docm, .docx, .eps, .odp, .odt, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .rtf. HTML previews are generated for files with the following extensions: .csv, .ods, .xls, .xlsm, .xlsx. Other formats will return an unsupported extension error.
Parameters:
Name Type Description
arg FilesPreviewArg The request parameters.
Returns:
Type
Promise.<FilesFileMetadata, Error.<FilesPreviewError>>

Get a temporary link to stream content of a file. This link will expire in four hours and afterwards you will get 410 Gone. Content-Type of the link is determined automatically by the file's mime type.
Parameters:
Name Type Description
arg FilesGetTemporaryLinkArg The request parameters.
Returns:
Type
Promise.<FilesGetTemporaryLinkResult, Error.<FilesGetTemporaryLinkError>>

filesGetThumbnail(arg)

Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif and bmp. Photos that are larger than 20MB in size won't be converted to a thumbnail.
Parameters:
Name Type Description
arg FilesThumbnailArg The request parameters.
Returns:
Type
Promise.<FilesFileMetadata, Error.<FilesThumbnailError>>

filesGetThumbnailBatch(arg)

Get thumbnails for a list of images. We allow up to 25 thumbnails in a single batch. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif and bmp. Photos that are larger than 20MB in size won't be converted to a thumbnail.
Parameters:
Name Type Description
arg FilesGetThumbnailBatchArg The request parameters.
Returns:
Type
Promise.<FilesGetThumbnailBatchResult, Error.<FilesGetThumbnailBatchError>>

filesListFolder(arg)

Starts returning the contents of a folder. If the result's ListFolderResult.has_more field is true, call list_folder/continue with the returned ListFolderResult.cursor to retrieve more entries. If you're using ListFolderArg.recursive set to true to keep a local cache of the contents of a Dropbox account, iterate through each entry in order and process them as follows to keep your local state in sync: For each FileMetadata, store the new entry at the given path in your local state. If the required parent folders don't exist yet, create them. If there's already something else at the given path, replace it and remove all its children. For each FolderMetadata, store the new entry at the given path in your local state. If the required parent folders don't exist yet, create them. If there's already something else at the given path, replace it but leave the children as they are. Check the new entry's FolderSharingInfo.read_only and set all its children's read-only statuses to match. For each DeletedMetadata, if your local state has something at the given path, remove it and all its children. If there's nothing at the given path, ignore this entry. Note: auth.RateLimitError may be returned if multiple list_folder or list_folder/continue calls with same parameters are made simultaneously by same API app for same user. If your app implements retry logic, please hold off the retry until the previous request finishes.
Parameters:
Name Type Description
arg FilesListFolderArg The request parameters.
Returns:
Type
Promise.<FilesListFolderResult, Error.<FilesListFolderError>>

filesListFolderContinue(arg)

Once a cursor has been retrieved from list_folder, use this to paginate through all files and retrieve updates to the folder, following the same rules as documented for list_folder.
Parameters:
Name Type Description
arg FilesListFolderContinueArg The request parameters.
Returns:
Type
Promise.<FilesListFolderResult, Error.<FilesListFolderContinueError>>

filesListFolderGetLatestCursor(arg)

A way to quickly get a cursor for the folder's state. Unlike list_folder, list_folder/get_latest_cursor doesn't return any entries. This endpoint is for app which only needs to know about new files and modifications and doesn't need to know about files that already exist in Dropbox.
Parameters:
Name Type Description
arg FilesListFolderArg The request parameters.
Returns:
Type
Promise.<FilesListFolderGetLatestCursorResult, Error.<FilesListFolderError>>

filesListFolderLongpoll(arg)

A longpoll endpoint to wait for changes on an account. In conjunction with list_folder/continue, this call gives you a low-latency way to monitor an account for file changes. The connection will block until there are changes available or a timeout occurs. This endpoint is useful mostly for client-side apps. If you're looking for server-side notifications, check out our webhooks documentation https://www.dropbox.com/developers/reference/webhooks.
Parameters:
Name Type Description
arg FilesListFolderLongpollArg The request parameters.
Returns:
Type
Promise.<FilesListFolderLongpollResult, Error.<FilesListFolderLongpollError>>

filesListRevisions(arg)

Returns revisions for files based on a file path or a file id. The file path or file id is identified from the latest file entry at the given file path or id. This end point allows your app to query either by file path or file id by setting the mode parameter appropriately. In the ListRevisionsMode.path (default) mode, all revisions at the same file path as the latest file entry are returned. If revisions with the same file id are desired, then mode must be set to ListRevisionsMode.id. The ListRevisionsMode.id mode is useful to retrieve revisions for a given file across moves or renames.
Parameters:
Name Type Description
arg FilesListRevisionsArg The request parameters.
Returns:
Type
Promise.<FilesListRevisionsResult, Error.<FilesListRevisionsError>>

filesMove(arg)

Move a file or folder to a different location in the user's Dropbox. If the source path is a folder all its contents will be moved.
Parameters:
Name Type Description
arg FilesRelocationArg The request parameters.
Deprecated:
  • Yes
Returns:
Type
Promise.<(FilesFileMetadata|FilesFolderMetadata|FilesDeletedMetadata), Error.<FilesRelocationError>>

filesMoveBatch(arg)

Move multiple files or folders to different locations at once in the user's Dropbox. This route is 'all or nothing', which means if one entry fails, the whole transaction will abort. This route will return job ID immediately and do the async moving job in background. Please use move_batch/check to check the job status.
Parameters:
Name Type Description
arg FilesRelocationBatchArg The request parameters.
Returns:
Type
Promise.<FilesRelocationBatchLaunch, Error.<void>>

filesMoveBatchCheck(arg)

Returns the status of an asynchronous job for move_batch. If success, it returns list of results for each entry.
Parameters:
Name Type Description
arg AsyncPollArg The request parameters.
Returns:
Type
Promise.<FilesRelocationBatchJobStatus, Error.<AsyncPollError>>

filesMoveV2(arg)

Move a file or folder to a different location in the user's Dropbox. If the source path is a folder all its contents will be moved.
Parameters:
Name Type Description
arg FilesRelocationArg The request parameters.
Returns:
Type
Promise.<FilesRelocationResult, Error.<FilesRelocationError>>

filesPermanentlyDelete(arg)

Permanently delete the file or folder at a given path (see https://www.dropbox.com/en/help/40). Note: This endpoint is only available for Dropbox Business apps.
Parameters:
Name Type Description
arg FilesDeleteArg The request parameters.
Returns:
Type
Promise.<void, Error.<FilesDeleteError>>

filesPropertiesAdd(arg)

Parameters:
Name Type Description
arg FilePropertiesAddPropertiesArg The request parameters.
Deprecated:
  • Yes
Returns:
Type
Promise.<void, Error.<FilePropertiesAddPropertiesError>>

filesPropertiesOverwrite(arg)

Parameters:
Name Type Description
arg FilePropertiesOverwritePropertyGroupArg The request parameters.
Deprecated:
  • Yes
Returns:
Type
Promise.<void, Error.<FilePropertiesInvalidPropertyGroupError>>

filesPropertiesRemove(arg)

Parameters:
Name Type Description
arg FilePropertiesRemovePropertiesArg The request parameters.
Deprecated:
  • Yes
Returns:
Type
Promise.<void, Error.<FilePropertiesRemovePropertiesError>>

filesPropertiesTemplateGet(arg)

Parameters:
Name Type Description
arg FilePropertiesGetTemplateArg The request parameters.
Deprecated:
  • Yes
Returns:
Type
Promise.<FilePropertiesGetTemplateResult, Error.<FilePropertiesTemplateError>>

filesPropertiesTemplateList(arg)

Parameters:
Name Type Description
arg void The request parameters.
Deprecated:
  • Yes
Returns:
Type
Promise.<FilePropertiesListTemplateResult, Error.<FilePropertiesTemplateError>>

filesPropertiesUpdate(arg)

Parameters:
Name Type Description
arg FilePropertiesUpdatePropertiesArg The request parameters.
Deprecated:
  • Yes
Returns:
Type
Promise.<void, Error.<FilePropertiesUpdatePropertiesError>>

filesRestore(arg)

Restore a file to a specific revision.
Parameters:
Name Type Description
arg FilesRestoreArg The request parameters.
Returns:
Type
Promise.<FilesFileMetadata, Error.<FilesRestoreError>>

filesSaveUrl(arg)

Save a specified URL into a file in user's Dropbox. If the given path already exists, the file will be renamed to avoid the conflict (e.g. myfile (1).txt).
Parameters:
Name Type Description
arg FilesSaveUrlArg The request parameters.
Returns:
Type
Promise.<FilesSaveUrlResult, Error.<FilesSaveUrlError>>

filesSaveUrlCheckJobStatus(arg)

Check the status of a save_url job.
Parameters:
Name Type Description
arg AsyncPollArg The request parameters.
Returns:
Type
Promise.<FilesSaveUrlJobStatus, Error.<AsyncPollError>>

filesSearch(arg)

Searches for files and folders. Note: Recent changes may not immediately be reflected in search results due to a short delay in indexing.
Parameters:
Name Type Description
arg FilesSearchArg The request parameters.
Returns:
Type
Promise.<FilesSearchResult, Error.<FilesSearchError>>

filesUpload(arg)

Create a new file with the contents provided in the request. Do not use this to upload a file larger than 150 MB. Instead, create an upload session with upload_session/start.
Parameters:
Name Type Description
arg FilesCommitInfo The request parameters.
Returns:
Type
Promise.<FilesFileMetadata, Error.<FilesUploadError>>

filesUploadSessionAppend(arg)

Append more data to an upload session. A single request should not upload more than 150 MB.
Parameters:
Name Type Description
arg FilesUploadSessionCursor The request parameters.
Deprecated:
  • Yes
Returns:
Type
Promise.<void, Error.<FilesUploadSessionLookupError>>

filesUploadSessionAppendV2(arg)

Append more data to an upload session. When the parameter close is set, this call will close the session. A single request should not upload more than 150 MB.
Parameters:
Name Type Description
arg FilesUploadSessionAppendArg The request parameters.
Returns:
Type
Promise.<void, Error.<FilesUploadSessionLookupError>>

filesUploadSessionFinish(arg)

Finish an upload session and save the uploaded data to the given file path. A single request should not upload more than 150 MB.
Parameters:
Name Type Description
arg FilesUploadSessionFinishArg The request parameters.
Returns:
Type
Promise.<FilesFileMetadata, Error.<FilesUploadSessionFinishError>>

filesUploadSessionFinishBatch(arg)

This route helps you commit many files at once into a user's Dropbox. Use upload_session/start and upload_session/append_v2 to upload file contents. We recommend uploading many files in parallel to increase throughput. Once the file contents have been uploaded, rather than calling upload_session/finish, use this route to finish all your upload sessions in a single request. UploadSessionStartArg.close or UploadSessionAppendArg.close needs to be true for the last upload_session/start or upload_session/append_v2 call. This route will return a job_id immediately and do the async commit job in background. Use upload_session/finish_batch/check to check the job status. For the same account, this route should be executed serially. That means you should not start the next job before current job finishes. We allow up to 1000 entries in a single request.
Parameters:
Name Type Description
arg FilesUploadSessionFinishBatchArg The request parameters.
Returns:
Type
Promise.<FilesUploadSessionFinishBatchLaunch, Error.<void>>

filesUploadSessionFinishBatchCheck(arg)

Returns the status of an asynchronous job for upload_session/finish_batch. If success, it returns list of result for each entry.
Parameters:
Name Type Description
arg AsyncPollArg The request parameters.
Returns:
Type
Promise.<FilesUploadSessionFinishBatchJobStatus, Error.<AsyncPollError>>

filesUploadSessionStart(arg)

Upload sessions allow you to upload a single file in one or more requests, for example where the size of the file is greater than 150 MB. This call starts a new upload session with the given data. You can then use upload_session/append_v2 to add more data and upload_session/finish to save all the data to a file in Dropbox. A single request should not upload more than 150 MB. An upload session can be used for a maximum of 48 hours. Attempting to use an UploadSessionStartResult.session_id with upload_session/append_v2 or upload_session/finish more than 48 hours after its creation will return a UploadSessionLookupError.not_found.
Parameters:
Name Type Description
arg FilesUploadSessionStartArg The request parameters.
Returns:
Type
Promise.<FilesUploadSessionStartResult, Error.<void>>

getAccessToken()

Get the access token
Inherited From:
Returns:
Access token
Type
String

getAuthenticationUrl(redirectUri [, state])

Get a URL that can be used to authenticate users for the Dropbox API.
Parameters:
Name Type Argument Description
redirectUri String A URL to redirect the user to after authenticating. This must be added to your app through the admin interface.
state String <optional>
State that will be returned in the redirect URL to help prevent cross site scripting attacks.
Inherited From:
Returns:
Url to send user to for Dropbox API authentication
Type
String

getClientId()

Get the client id
Inherited From:
Returns:
Client id
Type
String

paperDocsArchive(arg)

Marks the given Paper doc as archived. Note: This action can be performed or undone by anyone with edit permissions to the doc.
Parameters:
Name Type Description
arg PaperRefPaperDoc The request parameters.
Returns:
Type
Promise.<void, Error.<PaperDocLookupError>>

paperDocsCreate(arg)

Creates a new Paper doc with the provided content.
Parameters:
Name Type Description
arg PaperPaperDocCreateArgs The request parameters.
Returns:
Type
Promise.<PaperPaperDocCreateUpdateResult, Error.<PaperPaperDocCreateError>>

paperDocsDownload(arg)

Exports and downloads Paper doc either as HTML or markdown.
Parameters:
Name Type Description
arg PaperPaperDocExport The request parameters.
Returns:
Type
Promise.<PaperPaperDocExportResult, Error.<PaperDocLookupError>>

paperDocsFolderUsersList(arg)

Lists the users who are explicitly invited to the Paper folder in which the Paper doc is contained. For private folders all users (including owner) shared on the folder are listed and for team folders all non-team users shared on the folder are returned.
Parameters:
Name Type Description
arg PaperListUsersOnFolderArgs The request parameters.
Returns:
Type
Promise.<PaperListUsersOnFolderResponse, Error.<PaperDocLookupError>>

paperDocsFolderUsersListContinue(arg)

Once a cursor has been retrieved from docs/folder_users/list, use this to paginate through all users on the Paper folder.
Parameters:
Name Type Description
arg PaperListUsersOnFolderContinueArgs The request parameters.
Returns:
Type
Promise.<PaperListUsersOnFolderResponse, Error.<PaperListUsersCursorError>>

paperDocsGetFolderInfo(arg)

Retrieves folder information for the given Paper doc. This includes: - folder sharing policy; permissions for subfolders are set by the top-level folder. - full 'filepath', i.e. the list of folders (both folderId and folderName) from the root folder to the folder directly containing the Paper doc. Note: If the Paper doc is not in any folder (aka unfiled) the response will be empty.
Parameters:
Name Type Description
arg PaperRefPaperDoc The request parameters.
Returns:
Type
Promise.<PaperFoldersContainingPaperDoc, Error.<PaperDocLookupError>>

paperDocsList(arg)

Return the list of all Paper docs according to the argument specifications. To iterate over through the full pagination, pass the cursor to docs/list/continue.
Parameters:
Name Type Description
arg PaperListPaperDocsArgs The request parameters.
Returns:
Type
Promise.<PaperListPaperDocsResponse, Error.<void>>

paperDocsListContinue(arg)

Once a cursor has been retrieved from docs/list, use this to paginate through all Paper doc.
Parameters:
Name Type Description
arg PaperListPaperDocsContinueArgs The request parameters.
Returns:
Type
Promise.<PaperListPaperDocsResponse, Error.<PaperListDocsCursorError>>

paperDocsPermanentlyDelete(arg)

Permanently deletes the given Paper doc. This operation is final as the doc cannot be recovered. Note: This action can be performed only by the doc owner.
Parameters:
Name Type Description
arg PaperRefPaperDoc The request parameters.
Returns:
Type
Promise.<void, Error.<PaperDocLookupError>>

paperDocsSharingPolicyGet(arg)

Gets the default sharing policy for the given Paper doc.
Parameters:
Name Type Description
arg PaperRefPaperDoc The request parameters.
Returns:
Type
Promise.<PaperSharingPolicy, Error.<PaperDocLookupError>>

paperDocsSharingPolicySet(arg)

Sets the default sharing policy for the given Paper doc. The default 'team_sharing_policy' can be changed only by teams, omit this field for personal accounts. Note: 'public_sharing_policy' cannot be set to the value 'disabled' because this setting can be changed only via the team admin console.
Parameters:
Name Type Description
arg PaperPaperDocSharingPolicy The request parameters.
Returns:
Type
Promise.<void, Error.<PaperDocLookupError>>

paperDocsUpdate(arg)

Updates an existing Paper doc with the provided content.
Parameters:
Name Type Description
arg PaperPaperDocUpdateArgs The request parameters.
Returns:
Type
Promise.<PaperPaperDocCreateUpdateResult, Error.<PaperPaperDocUpdateError>>

paperDocsUsersAdd(arg)

Allows an owner or editor to add users to a Paper doc or change their permissions using their email address or Dropbox account ID. Note: The Doc owner's permissions cannot be changed.
Parameters:
Name Type Description
arg PaperAddPaperDocUser The request parameters.
Returns:
Type
Promise.<Array.<PaperAddPaperDocUserMemberResult>, Error.<PaperDocLookupError>>

paperDocsUsersList(arg)

Lists all users who visited the Paper doc or users with explicit access. This call excludes users who have been removed. The list is sorted by the date of the visit or the share date. The list will include both users, the explicitly shared ones as well as those who came in using the Paper url link.
Parameters:
Name Type Description
arg PaperListUsersOnPaperDocArgs The request parameters.
Returns:
Type
Promise.<PaperListUsersOnPaperDocResponse, Error.<PaperDocLookupError>>

paperDocsUsersListContinue(arg)

Once a cursor has been retrieved from docs/users/list, use this to paginate through all users on the Paper doc.
Parameters:
Name Type Description
arg PaperListUsersOnPaperDocContinueArgs The request parameters.
Returns:
Type
Promise.<PaperListUsersOnPaperDocResponse, Error.<PaperListUsersCursorError>>

paperDocsUsersRemove(arg)

Allows an owner or editor to remove users from a Paper doc using their email address or Dropbox account ID. Note: Doc owner cannot be removed.
Parameters:
Name Type Description
arg PaperRemovePaperDocUser The request parameters.
Returns:
Type
Promise.<void, Error.<PaperDocLookupError>>

setAccessToken(accessToken)

Set the access token used to authenticate requests to the API.
Parameters:
Name Type Description
accessToken String An access token
Inherited From:
Returns:
Type
undefined

setClientId(clientId)

Set the client id, which is used to help gain an access token.
Parameters:
Name Type Description
clientId String Your apps client id
Inherited From:
Returns:
Type
undefined

sharingAddFileMember(arg)

Adds specified members to a file.
Parameters:
Name Type Description
arg SharingAddFileMemberArgs The request parameters.
Returns:
Type
Promise.<Array.<SharingFileMemberActionResult>, Error.<SharingAddFileMemberError>>

sharingAddFolderMember(arg)

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 mount_folder on their behalf. Apps must have full Dropbox access to use this endpoint.
Parameters:
Name Type Description
arg SharingAddFolderMemberArg The request parameters.
Returns:
Type
Promise.<void, Error.<SharingAddFolderMemberError>>

sharingChangeFileMemberAccess(arg)

Identical to update_file_member but with less information returned.
Parameters:
Name Type Description
arg SharingChangeFileMemberAccessArgs The request parameters.
Deprecated:
  • Yes
Returns:
Type
Promise.<SharingFileMemberActionResult, Error.<SharingFileMemberActionError>>

sharingCheckJobStatus(arg)

Returns the status of an asynchronous job. Apps must have full Dropbox access to use this endpoint.
Parameters:
Name Type Description
arg AsyncPollArg The request parameters.
Returns:
Type
Promise.<SharingJobStatus, Error.<AsyncPollError>>

sharingCheckRemoveMemberJobStatus(arg)

Returns the status of an asynchronous job for sharing a folder. Apps must have full Dropbox access to use this endpoint.
Parameters:
Name Type Description
arg AsyncPollArg The request parameters.
Returns:
Type
Promise.<SharingRemoveMemberJobStatus, Error.<AsyncPollError>>

sharingCheckShareJobStatus(arg)

Returns the status of an asynchronous job for sharing a folder. Apps must have full Dropbox access to use this endpoint.
Parameters:
Name Type Description
arg AsyncPollArg The request parameters.
Returns:
Type
Promise.<SharingShareFolderJobStatus, Error.<AsyncPollError>>

Create a shared link. If a shared link already exists for the given path, that link is returned. Note that in the returned PathLinkMetadata, the PathLinkMetadata.url field is the shortened URL if CreateSharedLinkArg.short_url argument is set to 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 revoke_shared_link.
Parameters:
Name Type Description
arg SharingCreateSharedLinkArg The request parameters.
Deprecated:
  • Yes
Returns:
Type
Promise.<SharingPathLinkMetadata, Error.<SharingCreateSharedLinkError>>

sharingCreateSharedLinkWithSettings(arg)

Create a shared link with custom settings. If no settings are given then the default visibility is RequestedVisibility.public (The resolved visibility, though, may depend on other aspects such as team and shared folder settings).
Parameters:
Name Type Description
arg SharingCreateSharedLinkWithSettingsArg The request parameters.
Returns:
Type
Promise.<(SharingFileLinkMetadata|SharingFolderLinkMetadata|SharingSharedLinkMetadata), Error.<SharingCreateSharedLinkWithSettingsError>>

sharingGetFileMetadata(arg)

Returns shared file metadata.
Parameters:
Name Type Description
arg SharingGetFileMetadataArg The request parameters.
Returns:
Type
Promise.<SharingSharedFileMetadata, Error.<SharingGetFileMetadataError>>

sharingGetFileMetadataBatch(arg)

Returns shared file metadata.
Parameters:
Name Type Description
arg SharingGetFileMetadataBatchArg The request parameters.
Returns:
Type
Promise.<Array.<SharingGetFileMetadataBatchResult>, Error.<SharingSharingUserError>>

sharingGetFolderMetadata(arg)

Returns shared folder metadata by its folder ID. Apps must have full Dropbox access to use this endpoint.
Parameters:
Name Type Description
arg SharingGetMetadataArgs The request parameters.
Returns:
Type
Promise.<SharingSharedFolderMetadata, Error.<SharingSharedFolderAccessError>>

sharingGetSharedLinkFile(arg)

Download the shared link's file from a user's Dropbox.
Parameters:
Name Type Description
arg Object The request parameters.
Returns:
Type
Promise.<(SharingFileLinkMetadata|SharingFolderLinkMetadata|SharingSharedLinkMetadata), Error.<SharingGetSharedLinkFileError>>

sharingGetSharedLinkMetadata(arg)

Get the shared link's metadata.
Parameters:
Name Type Description
arg SharingGetSharedLinkMetadataArg The request parameters.
Returns:
Type
Promise.<(SharingFileLinkMetadata|SharingFolderLinkMetadata|SharingSharedLinkMetadata), Error.<SharingSharedLinkError>>

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. Note that the url field in the response is never the shortened URL.
Parameters:
Name Type Description
arg SharingGetSharedLinksArg The request parameters.
Deprecated:
  • Yes
Returns:
Type
Promise.<SharingGetSharedLinksResult, Error.<SharingGetSharedLinksError>>

sharingListFileMembers(arg)

Use to obtain the members who have been invited to a file, both inherited and uninherited members.
Parameters:
Name Type Description
arg SharingListFileMembersArg The request parameters.
Returns:
Type
Promise.<SharingSharedFileMembers, Error.<SharingListFileMembersError>>

sharingListFileMembersBatch(arg)

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.
Parameters:
Name Type Description
arg SharingListFileMembersBatchArg The request parameters.
Returns:
Type
Promise.<Array.<SharingListFileMembersBatchResult>, Error.<SharingSharingUserError>>

sharingListFileMembersContinue(arg)

Once a cursor has been retrieved from list_file_members or list_file_members/batch, use this to paginate through all shared file members.
Parameters:
Name Type Description
arg SharingListFileMembersContinueArg The request parameters.
Returns:
Type
Promise.<SharingSharedFileMembers, Error.<SharingListFileMembersContinueError>>

sharingListFolderMembers(arg)

Returns shared folder membership by its folder ID. Apps must have full Dropbox access to use this endpoint.
Parameters:
Name Type Description
arg SharingListFolderMembersArgs The request parameters.
Returns:
Type
Promise.<SharingSharedFolderMembers, Error.<SharingSharedFolderAccessError>>

sharingListFolderMembersContinue(arg)

Once a cursor has been retrieved from list_folder_members, use this to paginate through all shared folder members. Apps must have full Dropbox access to use this endpoint.
Parameters:
Name Type Description
arg SharingListFolderMembersContinueArg The request parameters.
Returns:
Type
Promise.<SharingSharedFolderMembers, Error.<SharingListFolderMembersContinueError>>

sharingListFolders(arg)

Return the list of all shared folders the current user has access to. Apps must have full Dropbox access to use this endpoint.
Parameters:
Name Type Description
arg SharingListFoldersArgs The request parameters.
Returns:
Type
Promise.<SharingListFoldersResult, Error.<void>>

sharingListFoldersContinue(arg)

Once a cursor has been retrieved from list_folders, use this to paginate through all shared folders. The cursor must come from a previous call to list_folders or list_folders/continue. Apps must have full Dropbox access to use this endpoint.
Parameters:
Name Type Description
arg SharingListFoldersContinueArg The request parameters.
Returns:
Type
Promise.<SharingListFoldersResult, Error.<SharingListFoldersContinueError>>

sharingListMountableFolders(arg)

Return the list of all shared folders the current user can mount or unmount. Apps must have full Dropbox access to use this endpoint.
Parameters:
Name Type Description
arg SharingListFoldersArgs The request parameters.
Returns:
Type
Promise.<SharingListFoldersResult, Error.<void>>

sharingListMountableFoldersContinue(arg)

Once a cursor has been retrieved from list_mountable_folders, use this to paginate through all mountable shared folders. The cursor must come from a previous call to list_mountable_folders or list_mountable_folders/continue. Apps must have full Dropbox access to use this endpoint.
Parameters:
Name Type Description
arg SharingListFoldersContinueArg The request parameters.
Returns:
Type
Promise.<SharingListFoldersResult, Error.<SharingListFoldersContinueError>>

sharingListReceivedFiles(arg)

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.
Parameters:
Name Type Description
arg SharingListFilesArg The request parameters.
Returns:
Type
Promise.<SharingListFilesResult, Error.<SharingSharingUserError>>

sharingListReceivedFilesContinue(arg)

Get more results with a cursor from list_received_files.
Parameters:
Name Type Description
arg SharingListFilesContinueArg The request parameters.
Returns:
Type
Promise.<SharingListFilesResult, Error.<SharingListFilesContinueError>>

List shared links of this user. If no path is given, returns a list of all shared links for the current user. 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.
Parameters:
Name Type Description
arg SharingListSharedLinksArg The request parameters.
Returns:
Type
Promise.<SharingListSharedLinksResult, Error.<SharingListSharedLinksError>>

sharingModifySharedLinkSettings(arg)

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 LinkPermissions.resolved_visibility of the returned SharedLinkMetadata will reflect the actual visibility of the shared link and the LinkPermissions.requested_visibility will reflect the requested visibility.
Parameters:
Name Type Description
arg SharingModifySharedLinkSettingsArgs The request parameters.
Returns:
Type
Promise.<(SharingFileLinkMetadata|SharingFolderLinkMetadata|SharingSharedLinkMetadata), Error.<SharingModifySharedLinkSettingsError>>

sharingMountFolder(arg)

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. Apps must have full Dropbox access to use this endpoint.
Parameters:
Name Type Description
arg SharingMountFolderArg The request parameters.
Returns:
Type
Promise.<SharingSharedFolderMetadata, Error.<SharingMountFolderError>>

sharingRelinquishFileMembership(arg)

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. Apps must have full Dropbox access to use this endpoint.
Parameters:
Name Type Description
arg SharingRelinquishFileMembershipArg The request parameters.
Returns:
Type
Promise.<void, Error.<SharingRelinquishFileMembershipError>>

sharingRelinquishFolderMembership(arg)

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. Apps must have full Dropbox access to use this endpoint.
Parameters:
Name Type Description
arg SharingRelinquishFolderMembershipArg The request parameters.
Returns:
Type
Promise.<AsyncLaunchEmptyResult, Error.<SharingRelinquishFolderMembershipError>>

sharingRemoveFileMember(arg)

Identical to remove_file_member_2 but with less information returned.
Parameters:
Name Type Description
arg SharingRemoveFileMemberArg The request parameters.
Deprecated:
  • Yes
Returns:
Type
Promise.<SharingFileMemberActionIndividualResult, Error.<SharingRemoveFileMemberError>>

sharingRemoveFileMember2(arg)

Removes a specified member from the file.
Parameters:
Name Type Description
arg SharingRemoveFileMemberArg The request parameters.
Returns:
Type
Promise.<SharingFileMemberRemoveActionResult, Error.<SharingRemoveFileMemberError>>

sharingRemoveFolderMember(arg)

Allows an owner or editor (if the ACL update policy allows) of a shared folder to remove another member. Apps must have full Dropbox access to use this endpoint.
Parameters:
Name Type Description
arg SharingRemoveFolderMemberArg The request parameters.
Returns:
Type
Promise.<AsyncLaunchResultBase, Error.<SharingRemoveFolderMemberError>>

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 list_shared_links with the file as the ListSharedLinksArg.path argument.
Parameters:
Name Type Description
arg SharingRevokeSharedLinkArg The request parameters.
Returns:
Type
Promise.<void, Error.<SharingRevokeSharedLinkError>>

sharingShareFolder(arg)

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 a ShareFolderLaunch.async_job_id is returned, you'll need to call check_share_job_status until the action completes to get the metadata for the folder. Apps must have full Dropbox access to use this endpoint.
Parameters:
Name Type Description
arg SharingShareFolderArg The request parameters.
Returns:
Type
Promise.<SharingShareFolderLaunch, Error.<SharingShareFolderError>>

sharingTransferFolder(arg)

Transfer ownership of a shared folder to a member of the shared folder. User must have AccessLevel.owner access to the shared folder to perform a transfer. Apps must have full Dropbox access to use this endpoint.
Parameters:
Name Type Description
arg SharingTransferFolderArg The request parameters.
Returns:
Type
Promise.<void, Error.<SharingTransferFolderError>>

sharingUnmountFolder(arg)

The current user unmounts the designated folder. They can re-mount the folder at a later time using mount_folder. Apps must have full Dropbox access to use this endpoint.
Parameters:
Name Type Description
arg SharingUnmountFolderArg The request parameters.
Returns:
Type
Promise.<void, Error.<SharingUnmountFolderError>>

sharingUnshareFile(arg)

Remove all members from this file. Does not remove inherited members.
Parameters:
Name Type Description
arg SharingUnshareFileArg The request parameters.
Returns:
Type
Promise.<void, Error.<SharingUnshareFileError>>

sharingUnshareFolder(arg)

Allows a shared folder owner to unshare the folder. You'll need to call check_job_status to determine if the action has completed successfully. Apps must have full Dropbox access to use this endpoint.
Parameters:
Name Type Description
arg SharingUnshareFolderArg The request parameters.
Returns:
Type
Promise.<AsyncLaunchEmptyResult, Error.<SharingUnshareFolderError>>

sharingUpdateFileMember(arg)

Changes a member's access on a shared file.
Parameters:
Name Type Description
arg SharingUpdateFileMemberArgs The request parameters.
Returns:
Type
Promise.<SharingMemberAccessLevelResult, Error.<SharingFileMemberActionError>>

sharingUpdateFolderMember(arg)

Allows an owner or editor of a shared folder to update another member's permissions. Apps must have full Dropbox access to use this endpoint.
Parameters:
Name Type Description
arg SharingUpdateFolderMemberArg The request parameters.
Returns:
Type
Promise.<SharingMemberAccessLevelResult, Error.<SharingUpdateFolderMemberError>>

sharingUpdateFolderPolicy(arg)

Update the sharing policies for a shared folder. User must have AccessLevel.owner access to the shared folder to update its policies. Apps must have full Dropbox access to use this endpoint.
Parameters:
Name Type Description
arg SharingUpdateFolderPolicyArg The request parameters.
Returns:
Type
Promise.<SharingSharedFolderMetadata, Error.<SharingUpdateFolderPolicyError>>

teamLogGetEvents(arg)

Retrieves team events. Permission : Team Auditing.
Parameters:
Name Type Description
arg TeamLogGetTeamEventsArg The request parameters.
Returns:
Type
Promise.<TeamLogGetTeamEventsResult, Error.<TeamLogGetTeamEventsError>>

teamLogGetEventsContinue(arg)

Once a cursor has been retrieved from get_events, use this to paginate through all events. Permission : Team Auditing.
Parameters:
Name Type Description
arg TeamLogGetTeamEventsContinueArg The request parameters.
Returns:
Type
Promise.<TeamLogGetTeamEventsResult, Error.<TeamLogGetTeamEventsContinueError>>

usersGetAccount(arg)

Get information about a user's account.
Parameters:
Name Type Description
arg UsersGetAccountArg The request parameters.
Returns:
Type
Promise.<UsersBasicAccount, Error.<UsersGetAccountError>>

usersGetAccountBatch(arg)

Get information about multiple user accounts. At most 300 accounts may be queried per request.
Parameters:
Name Type Description
arg UsersGetAccountBatchArg The request parameters.
Returns:
Type
Promise.<Object, Error.<UsersGetAccountBatchError>>

usersGetCurrentAccount(arg)

Get information about the current user's account.
Parameters:
Name Type Description
arg void The request parameters.
Returns:
Type
Promise.<UsersFullAccount, Error.<void>>

usersGetSpaceUsage(arg)

Get the space usage information for the current user's account.
Parameters:
Name Type Description
arg void The request parameters.
Returns:
Type
Promise.<UsersSpaceUsage, Error.<void>>