Skip to content

Latest commit

 

History

History
2255 lines (1853 loc) · 83.1 KB

EXAMPLES.md

File metadata and controls

2255 lines (1853 loc) · 83.1 KB

auth/token/from_oauth1 (see docs)

Creates an OAuth 2.0 access token from the supplied OAuth 1.0 access token.

dropbox({
    resource: 'auth/token/from_oauth1',
    parameters: {
        'oauth1_token': 'qievr8hamyg6ndck',
        'oauth1_token_secret': 'qomoftv0472git7'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

auth/token/revoke (see docs)

Disables the access token used to authenticate the call.

dropbox({
    resource: 'auth/token/revoke'
}, (err, result, response) => {
    //see docs for `result` parameters
});

contacts/delete_manual_contacts (see docs)

Removes all manually added contacts. You'll still keep contacts who are on your team or who you imported. New contacts will be added when you share.

dropbox({
    resource: 'contacts/delete_manual_contacts'
}, (err, result, response) => {
    //see docs for `result` parameters
});

contacts/delete_manual_contacts_batch (see docs)

Removes manually added contacts from the given list.

dropbox({
    resource: 'contacts/delete_manual_contacts_batch',
    parameters: {
        'email_addresses': ['[email protected]', '[email protected]']
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

file_properties/properties/add (see docs)

Add property groups to a Dropbox file. See templates/add_for_user or templates/add_for_team to create new templates.

dropbox({
    resource: 'file_properties/properties/add',
    parameters: {
        'path': '/my_awesome/word.docx',
        'property_groups': [{
            'template_id': 'ptid:1a5n2i6d3OYEAAAAAAAAAYa',
            'fields': [{
                'name': 'Security Policy',
                'value': 'Confidential'
            }]
        }]
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

file_properties/properties/overwrite (see docs)

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.

dropbox({
    resource: 'file_properties/properties/overwrite',
    parameters: {
        'path': '/my_awesome/word.docx',
        'property_groups': [{
            'template_id': 'ptid:1a5n2i6d3OYEAAAAAAAAAYa',
            'fields': [{
                'name': 'Security Policy',
                'value': 'Confidential'
            }]
        }]
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

file_properties/properties/remove (see docs)

Permanently removes 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. To remove a template, see templates/remove_for_user or templates/remove_for_team.

dropbox({
    resource: 'file_properties/properties/remove',
    parameters: {
        'path': '/my_awesome/word.docx',
        'property_template_ids': ['ptid:1a5n2i6d3OYEAAAAAAAAAYa']
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

file_properties/properties/search (see docs)

Search across property templates for particular property field values.

dropbox({
    resource: 'file_properties/properties/search',
    parameters: {
        'queries': [{
            'query': 'Confidential',
            'mode': {
                '.tag': 'field_name',
                'field_name': 'Security'
            },
            'logical_operator': 'or_operator'
        }],
        'template_filter': 'filter_none'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

file_properties/properties/search/continue (see docs)

Once a cursor has been retrieved from properties/search, use this to paginate through all search results.

dropbox({
    resource: 'file_properties/properties/search/continue',
    parameters: {
        'cursor': 'ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

file_properties/properties/update (see docs)

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.

dropbox({
    resource: 'file_properties/properties/update',
    parameters: {
        'path': '/my_awesome/word.docx',
        'update_property_groups': [{
            'template_id': 'ptid:1a5n2i6d3OYEAAAAAAAAAYa',
            'add_or_update_fields': [{
                'name': 'Security Policy',
                'value': 'Confidential'
            }],
            'remove_fields': []
        }]
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

file_properties/templates/add_for_user (see docs)

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.

dropbox({
    resource: 'file_properties/templates/add_for_user',
    parameters: {
        'name': 'Security',
        'description': 'These properties describe how confidential this file or folder is.',
        'fields': [{
            'name': 'Security Policy',
            'description': 'This is the security policy of the file or folder described.\nPolicies can be Confidential, Public or Internal.',
            'type': 'string'
        }]
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

file_properties/templates/get_for_user (see docs)

Get the schema for a specified template. This endpoint can't be called on a team member or admin's behalf.

dropbox({
    resource: 'file_properties/templates/get_for_user',
    parameters: {
        'template_id': 'ptid:1a5n2i6d3OYEAAAAAAAAAYa'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

file_properties/templates/list_for_user (see docs)

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.

dropbox({
    resource: 'file_properties/templates/list_for_user'
}, (err, result, response) => {
    //see docs for `result` parameters
});

file_properties/templates/remove_for_user (see docs)

Permanently removes the specified template created from templates/add_for_user. All properties associated with the template will also be removed. This action cannot be undone.

dropbox({
    resource: 'file_properties/templates/remove_for_user',
    parameters: {
        'template_id': 'ptid:1a5n2i6d3OYEAAAAAAAAAYa'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

file_properties/templates/update_for_user (see docs)

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.

dropbox({
    resource: 'file_properties/templates/update_for_user',
    parameters: {
        'template_id': 'ptid:1a5n2i6d3OYEAAAAAAAAAYa',
        'name': 'New Security Template Name',
        'description': 'These properties will describe how confidential this file or folder is.',
        'add_fields': [{
            'name': 'Security Policy',
            'description': 'This is the security policy of the file or folder described.\nPolicies can be Confidential, Public or Internal.',
            'type': 'string'
        }]
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

file_requests/create (see docs)

Creates a file request for this user.

dropbox({
    resource: 'file_requests/create',
    parameters: {
        'title': 'Homework submission',
        'destination': '/File Requests/Homework',
        'deadline': {
            'deadline': '2020-10-12T17:00:00Z',
            'allow_late_uploads': 'seven_days'
        },
        'open': true
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

file_requests/delete (see docs)

Update a file request.

dropbox({
    resource: 'file_requests/delete',
    parameters: {
        'ids': ['oaCAVmEyrqYnkZX9955Y', 'BaZmehYoXMPtaRmfTbSG']
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

file_requests/get (see docs)

Returns the specified file request.

dropbox({
    resource: 'file_requests/get',
    parameters: {
        'id': 'oaCAVmEyrqYnkZX9955Y'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

file_requests/list (see docs)

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.

dropbox({
    resource: 'file_requests/list',
    parameters: {
        'limit': 1000
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

file_requests/list/continue (see docs)

Once a cursor has been retrieved from list:2, use this to paginate through all file requests. The cursor must come from a previous call to list:2 or list/continue.

dropbox({
    resource: 'file_requests/list/continue',
    parameters: {
        'cursor': 'ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

file_requests/update (see docs)

Update a file request.

dropbox({
    resource: 'file_requests/update',
    parameters: {
        'id': 'oaCAVmEyrqYnkZX9955Y',
        'title': 'Homework submission',
        'destination': '/File Requests/Homework',
        'deadline': {
            '.tag': 'update',
            'deadline': '2020-10-12T17:00:00Z',
            'allow_late_uploads': 'seven_days'
        },
        'open': true
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/copy (see docs)

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.

dropbox({
    resource: 'files/copy',
    parameters: {
        'from_path': '/Homework/math',
        'to_path': '/Homework/algebra',
        'allow_shared_folder': false,
        'autorename': false,
        'allow_ownership_transfer': false
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/copy_batch (see docs)

Copy multiple files or folders to different locations at once in the user's Dropbox. This route will replace copy_batch:1. The main difference is this route will return status for each entry, while copy_batch:1 raises failure if any entry fails. This route will either finish synchronously, or return a job ID and do the async copy job in background. Please use copy_batch/check:2 to check the job status.

dropbox({
    resource: 'files/copy_batch',
    parameters: {
        'entries': [{
            'from_path': '/Homework/math',
            'to_path': '/Homework/algebra'
        }],
        'autorename': false
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/copy_batch/check (see docs)

Returns the status of an asynchronous job for copy_batch:2. It returns list of results for each entry.

dropbox({
    resource: 'files/copy_batch/check',
    parameters: {
        'async_job_id': '34g93hh34h04y384084'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/copy_reference/get (see docs)

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.

dropbox({
    resource: 'files/copy_reference/get',
    parameters: {
        'path': '/video.mp4'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/copy_reference/save (see docs)

Save a copy reference returned by copy_reference/get to the user's Dropbox.

dropbox({
    resource: 'files/copy_reference/save',
    parameters: {
        'copy_reference': 'z1X6ATl6aWtzOGq0c3g5Ng',
        'path': '/video.mp4'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/create_folder (see docs)

Create a folder at a given path.

dropbox({
    resource: 'files/create_folder',
    parameters: {
        'path': '/Homework/math',
        'autorename': false
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/create_folder_batch (see docs)

Create multiple folders at once. This route is asynchronous for large batches, which returns a job ID immediately and runs the create folder batch asynchronously. Otherwise, creates the folders and returns the result synchronously for smaller inputs. You can force asynchronous behaviour by using the CreateFolderBatchArg.force_async flag. Use create_folder_batch/check to check the job status.

dropbox({
    resource: 'files/create_folder_batch',
    parameters: {
        'paths': ['/Homework/math'],
        'autorename': false,
        'force_async': false
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/create_folder_batch/check (see docs)

Returns the status of an asynchronous job for create_folder_batch. If success, it returns list of result for each entry.

dropbox({
    resource: 'files/create_folder_batch/check',
    parameters: {
        'async_job_id': '34g93hh34h04y384084'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/delete (see docs)

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.

dropbox({
    resource: 'files/delete',
    parameters: {
        'path': '/Homework/math/Prime_Numbers.txt'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/delete_batch (see docs)

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.

dropbox({
    resource: 'files/delete_batch',
    parameters: {
        'entries': [{
            'path': '/Homework/math/Prime_Numbers.txt'
        }]
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/delete_batch/check (see docs)

Returns the status of an asynchronous job for delete_batch. If success, it returns list of result for each entry.

dropbox({
    resource: 'files/delete_batch/check',
    parameters: {
        'async_job_id': '34g93hh34h04y384084'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/download (see docs)

Download a file from a user's Dropbox.

const stream = dropbox({
    resource: 'files/download',
    parameters: {
        'path': '/Homework/math/Prime_Numbers.txt'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

stream
    .pipe(fs.createWriteStream('/Homework/math/Prime_Numbers.txt')); //pipe the stream

files/download_zip (see docs)

Download a folder from the user's Dropbox, as a zip file. The folder must be less than 20 GB in size and have fewer than 10,000 total files. The input cannot be a single file. Any single file must be less than 4GB in size.

const stream = dropbox({
    resource: 'files/download_zip',
    parameters: {
        'path': '/Homework/math'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

stream
    .pipe(fs.createWriteStream('/Homework/math')); //pipe the stream

files/get_metadata (see docs)

Returns the metadata for a file or folder. Note: Metadata for the root folder is unsupported.

dropbox({
    resource: 'files/get_metadata',
    parameters: {
        'path': '/Homework/math',
        'include_media_info': false,
        'include_deleted': false,
        'include_has_explicit_shared_members': false
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/get_preview (see docs)

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.

const stream = dropbox({
    resource: 'files/get_preview',
    parameters: {
        'path': '/word.docx'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

stream
    .pipe(fs.createWriteStream('/word.docx')); //pipe the stream

files/get_temporary_link (see docs)

Get a temporary link to stream content of a file. This link will expire in four hours and afterwards you will get 410 Gone. So this URL should not be used to display content directly in the browser. Content-Type of the link is determined automatically by the file's mime type.

dropbox({
    resource: 'files/get_temporary_link',
    parameters: {
        'path': '/video.mp4'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/get_temporary_upload_link (see docs)

Get a one-time use temporary upload link to upload a file to a Dropbox location. This endpoint acts as a delayed upload. The returned temporary upload link may be used to make a POST request with the data to be uploaded. The upload will then be perfomed with the CommitInfo previously provided to get_temporary_upload_link but evaluated only upon consumption. Hence, errors stemming from invalid CommitInfo with respect to the state of the user's Dropbox will only be communicated at consumption time. Additionally, these errors are surfaced as generic HTTP 409 Conflict responses, potentially hiding issue details. The maximum temporary upload link duration is 4 hours. Upon consumption or expiration, a new link will have to be generated. Multiple links may exist for a specific upload path at any given time. The POST request on the temporary upload link must have its Content-Type set to "application/octet-stream". Example temporary upload link consumption request: curl -X POST https://dl.dropboxusercontent.com/apitul/1/bNi2uIYF51cVBND --header "Content-Type: application/octet-stream" --data-binary @local_file.txt A successful temporary upload link consumption request returns the content hash of the uploaded data in JSON format. Example succesful temporary upload link consumption response: {"content-hash": "599d71033d700ac892a0e48fa61b125d2f5994"} An unsuccessful temporary upload link consumption request returns any of the following status codes: HTTP 400 Bad Request: Content-Type is not one of application/octet-stream and text/plain or request is invalid. HTTP 409 Conflict: The temporary upload link does not exist or is currently unavailable, the upload failed, or another error happened. HTTP 410 Gone: The temporary upload link is expired or consumed. Example unsuccessful temporary upload link consumption response: Temporary upload link has been recently consumed.

dropbox({
    resource: 'files/get_temporary_upload_link',
    parameters: {
        'commit_info': {
            'path': '/Homework/math/Matrices.txt',
            'mode': 'add',
            'autorename': true,
            'mute': false,
            'strict_conflict': false
        },
        'duration': 3600
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/get_thumbnail (see docs)

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.

const stream = dropbox({
    resource: 'files/get_thumbnail',
    parameters: {
        'path': '/image.jpg',
        'format': 'jpeg',
        'size': 'w64h64',
        'mode': 'strict'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

stream
    .pipe(fs.createWriteStream('/image.jpg')); //pipe the stream

files/get_thumbnail_batch (see docs)

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.

dropbox({
    resource: 'files/get_thumbnail_batch',
    parameters: {
        'entries': [{
            'path': '/image.jpg',
            'format': 'jpeg',
            'size': 'w64h64',
            'mode': 'strict'
        }]
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/list_folder (see docs)

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.

dropbox({
    resource: 'files/list_folder',
    parameters: {
        'path': '/Homework/math',
        'recursive': false,
        'include_media_info': false,
        'include_deleted': false,
        'include_has_explicit_shared_members': false,
        'include_mounted_folders': true
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/list_folder/continue (see docs)

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.

dropbox({
    resource: 'files/list_folder/continue',
    parameters: {
        'cursor': 'ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/list_folder/get_latest_cursor (see docs)

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.

dropbox({
    resource: 'files/list_folder/get_latest_cursor',
    parameters: {
        'path': '/Homework/math',
        'recursive': false,
        'include_media_info': false,
        'include_deleted': false,
        'include_has_explicit_shared_members': false,
        'include_mounted_folders': true
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/list_folder/longpoll (see docs)

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.

dropbox({
    resource: 'files/list_folder/longpoll',
    parameters: {
        'cursor': 'ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu',
        'timeout': 30
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/list_revisions (see docs)

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.

dropbox({
    resource: 'files/list_revisions',
    parameters: {
        'path': '/root/word.docx',
        'mode': 'path',
        'limit': 10
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/move (see docs)

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.

dropbox({
    resource: 'files/move',
    parameters: {
        'from_path': '/Homework/math',
        'to_path': '/Homework/algebra',
        'allow_shared_folder': false,
        'autorename': false,
        'allow_ownership_transfer': false
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/move_batch (see docs)

Move multiple files or folders to different locations at once in the user's Dropbox. This route will replace move_batch:1. The main difference is this route will return status for each entry, while move_batch:1 raises failure if any entry fails. This route will either finish synchronously, or return a job ID and do the async move job in background. Please use move_batch/check:2 to check the job status.

dropbox({
    resource: 'files/move_batch',
    parameters: {
        'entries': [{
            'from_path': '/Homework/math',
            'to_path': '/Homework/algebra'
        }],
        'autorename': false,
        'allow_ownership_transfer': false
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/move_batch/check (see docs)

Returns the status of an asynchronous job for move_batch:2. It returns list of results for each entry.

dropbox({
    resource: 'files/move_batch/check',
    parameters: {
        'async_job_id': '34g93hh34h04y384084'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/permanently_delete (see docs)

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.

dropbox({
    resource: 'files/permanently_delete',
    parameters: {
        'path': '/Homework/math/Prime_Numbers.txt'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/restore (see docs)

Restore a specific revision of a file to the given path.

dropbox({
    resource: 'files/restore',
    parameters: {
        'path': '/root/word.docx',
        'rev': 'a1c10ce0dd78'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/save_url (see docs)

Save the data from a specified URL into a file in user's Dropbox. Note that the transfer from the URL must complete within 5 minutes, or the operation will time out and the job will fail. If the given path already exists, the file will be renamed to avoid the conflict (e.g. myfile (1).txt).

dropbox({
    resource: 'files/save_url',
    parameters: {
        'path': '/a.txt',
        'url': 'http://example.com/a.txt'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/save_url/check_job_status (see docs)

Check the status of a save_url job.

dropbox({
    resource: 'files/save_url/check_job_status',
    parameters: {
        'async_job_id': '34g93hh34h04y384084'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/search (see docs)

Searches for files and folders. Note: Recent changes may not immediately be reflected in search results due to a short delay in indexing.

dropbox({
    resource: 'files/search',
    parameters: {
        'path': '',
        'query': 'prime numbers',
        'start': 0,
        'max_results': 100,
        'mode': 'filename'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/upload (see docs)

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. Calls to this endpoint will count as data transport calls for any Dropbox Business teams with a limit on the number of data transport calls allowed per month. For more information, see the Data transport limit page.

const stream = dropbox({
    resource: 'files/upload',
    parameters: {
        'path': '/Homework/math/Matrices.txt',
        'mode': 'add',
        'autorename': true,
        'mute': false,
        'strict_conflict': false
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

fs.createReadStream('/Homework/math/Matrices.txt').pipe(stream);

files/upload_session/append (see docs)

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. The maximum size of a file one can upload to an upload session is 350 GB. Calls to this endpoint will count as data transport calls for any Dropbox Business teams with a limit on the number of data transport calls allowed per month. For more information, see the Data transport limit page.

const stream = dropbox({
    resource: 'files/upload_session/append',
    parameters: {
        'cursor': {
            'session_id': '1234faaf0678bcde',
            'offset': 0
        },
        'close': false
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

fs.createReadStream().pipe(stream);

files/upload_session/finish (see docs)

Finish an upload session and save the uploaded data to the given file path. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. Calls to this endpoint will count as data transport calls for any Dropbox Business teams with a limit on the number of data transport calls allowed per month. For more information, see the Data transport limit page.

const stream = dropbox({
    resource: 'files/upload_session/finish',
    parameters: {
        'cursor': {
            'session_id': '1234faaf0678bcde',
            'offset': 0
        },
        'commit': {
            'path': '/Homework/math/Matrices.txt',
            'mode': 'add',
            'autorename': true,
            'mute': false,
            'strict_conflict': false
        }
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

fs.createReadStream().pipe(stream);

files/upload_session/finish_batch (see docs)

This route helps you commit many files at once into a user's Dropbox. Use upload_session/start and upload_session/append:2 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:2 call. The maximum size of a file one can upload to an upload session is 350 GB. 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. Calls to this endpoint will count as data transport calls for any Dropbox Business teams with a limit on the number of data transport calls allowed per month. For more information, see the Data transport limit page.

dropbox({
    resource: 'files/upload_session/finish_batch',
    parameters: {
        'entries': [{
            'cursor': {
                'session_id': '1234faaf0678bcde',
                'offset': 0
            },
            'commit': {
                'path': '/Homework/math/Matrices.txt',
                'mode': 'add',
                'autorename': true,
                'mute': false,
                'strict_conflict': false
            }
        }]
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/upload_session/finish_batch/check (see docs)

Returns the status of an asynchronous job for upload_session/finish_batch. If success, it returns list of result for each entry.

dropbox({
    resource: 'files/upload_session/finish_batch/check',
    parameters: {
        'async_job_id': '34g93hh34h04y384084'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

files/upload_session/start (see docs)

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:2 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. The maximum size of a file one can upload to an upload session is 350 GB. An upload session can be used for a maximum of 48 hours. Attempting to use an UploadSessionStartResult.session_id with upload_session/append:2 or upload_session/finish more than 48 hours after its creation will return a UploadSessionLookupError.not_found. Calls to this endpoint will count as data transport calls for any Dropbox Business teams with a limit on the number of data transport calls allowed per month. For more information, see the Data transport limit page.

const stream = dropbox({
    resource: 'files/upload_session/start',
    parameters: {
        'close': false
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

fs.createReadStream().pipe(stream);

paper/docs/archive (see docs)

Marks the given Paper doc as archived. Note: This action can be performed or undone by anyone with edit permissions to the doc.

dropbox({
    resource: 'paper/docs/archive',
    parameters: {
        'doc_id': 'uaSvRuxvnkFa12PTkBv5q'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

paper/docs/create (see docs)

Creates a new Paper doc with the provided content.

const stream = dropbox({
    resource: 'paper/docs/create',
    parameters: {
        'import_format': 'markdown'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

fs.createReadStream().pipe(stream);

paper/docs/download (see docs)

Exports and downloads Paper doc either as HTML or markdown.

const stream = dropbox({
    resource: 'paper/docs/download',
    parameters: {
        'doc_id': 'uaSvRuxvnkFa12PTkBv5q',
        'export_format': 'markdown'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

stream
    .pipe(fs.createWriteStream()); //pipe the stream

paper/docs/folder_users/list (see docs)

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.

dropbox({
    resource: 'paper/docs/folder_users/list',
    parameters: {
        'doc_id': 'uaSvRuxvnkFa12PTkBv5q',
        'limit': 100
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

paper/docs/folder_users/list/continue (see docs)

Once a cursor has been retrieved from docs/folder_users/list, use this to paginate through all users on the Paper folder.

dropbox({
    resource: 'paper/docs/folder_users/list/continue',
    parameters: {
        'doc_id': 'uaSvRuxvnkFa12PTkBv5q',
        'cursor': 'U60b6BxT43ySd5sAVQbbIvoteSnWLjUdLU7aR25hbt3ySd5sAVQbbIvoteSnWLjUd'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

paper/docs/get_folder_info (see docs)

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.

dropbox({
    resource: 'paper/docs/get_folder_info',
    parameters: {
        'doc_id': 'uaSvRuxvnkFa12PTkBv5q'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

paper/docs/list (see docs)

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.

dropbox({
    resource: 'paper/docs/list',
    parameters: {
        'filter_by': 'docs_created',
        'sort_by': 'modified',
        'sort_order': 'descending',
        'limit': 100
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

paper/docs/list/continue (see docs)

Once a cursor has been retrieved from docs/list, use this to paginate through all Paper doc.

dropbox({
    resource: 'paper/docs/list/continue',
    parameters: {
        'cursor': 'U60b6BxT43ySd5sAVQbbIvoteSnWLjUdLU7aR25hbt3ySd5sAVQbbIvoteSnWLjUd'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

paper/docs/permanently_delete (see docs)

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.

dropbox({
    resource: 'paper/docs/permanently_delete',
    parameters: {
        'doc_id': 'uaSvRuxvnkFa12PTkBv5q'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

paper/docs/sharing_policy/get (see docs)

Gets the default sharing policy for the given Paper doc.

dropbox({
    resource: 'paper/docs/sharing_policy/get',
    parameters: {
        'doc_id': 'uaSvRuxvnkFa12PTkBv5q'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

paper/docs/sharing_policy/set (see docs)

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.

dropbox({
    resource: 'paper/docs/sharing_policy/set',
    parameters: {
        'doc_id': 'uaSvRuxvnkFa12PTkBv5q',
        'sharing_policy': {
            'public_sharing_policy': 'people_with_link_can_edit',
            'team_sharing_policy': 'people_with_link_can_edit'
        }
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

paper/docs/update (see docs)

Updates an existing Paper doc with the provided content.

const stream = dropbox({
    resource: 'paper/docs/update',
    parameters: {
        'doc_id': 'uaSvRuxvnkFa12PTkBv5q',
        'doc_update_policy': 'overwrite_all',
        'revision': 12345,
        'import_format': 'html'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

fs.createReadStream().pipe(stream);

paper/docs/users/add (see docs)

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.

dropbox({
    resource: 'paper/docs/users/add',
    parameters: {
        'doc_id': 'uaSvRuxvnkFa12PTkBv5q',
        'members': [{
            'member': {
                '.tag': 'email',
                'email': '[email protected]'
            },
            'permission_level': 'view_and_comment'
        }],
        'custom_message': 'Welcome to Paper.',
        'quiet': false
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

paper/docs/users/list (see docs)

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.

dropbox({
    resource: 'paper/docs/users/list',
    parameters: {
        'doc_id': 'uaSvRuxvnkFa12PTkBv5q',
        'limit': 100,
        'filter_by': 'shared'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

paper/docs/users/list/continue (see docs)

Once a cursor has been retrieved from docs/users/list, use this to paginate through all users on the Paper doc.

dropbox({
    resource: 'paper/docs/users/list/continue',
    parameters: {
        'doc_id': 'uaSvRuxvnkFa12PTkBv5q',
        'cursor': 'U60b6BxT43ySd5sAVQbbIvoteSnWLjUdLU7aR25hbt3ySd5sAVQbbIvoteSnWLjUd'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

paper/docs/users/remove (see docs)

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.

dropbox({
    resource: 'paper/docs/users/remove',
    parameters: {
        'doc_id': 'uaSvRuxvnkFa12PTkBv5q',
        'member': {
            '.tag': 'email',
            'email': '[email protected]'
        }
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/add_file_member (see docs)

Adds specified members to a file.

dropbox({
    resource: 'sharing/add_file_member',
    parameters: {
        'file': 'id:3kmLmQFnf1AAAAAAAAAAAw',
        'members': [{
            '.tag': 'email',
            'email': '[email protected]'
        }],
        'custom_message': 'This is a custom message about ACME.doc',
        'quiet': false,
        'access_level': 'viewer',
        'add_message_as_comment': false
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/add_folder_member (see docs)

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.

dropbox({
    resource: 'sharing/add_folder_member',
    parameters: {
        'shared_folder_id': '84528192421',
        'members': [{
            'member': {
                '.tag': 'email',
                'email': '[email protected]'
            },
            'access_level': 'editor'
        }, {
            'member': {
                '.tag': 'dropbox_id',
                'dropbox_id': 'dbid:AAEufNrMPSPe0dMQijRP0N_aZtBJRm26W4Q'
            },
            'access_level': 'viewer'
        }],
        'quiet': false,
        'custom_message': 'Documentation for launch day'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/check_job_status (see docs)

Returns the status of an asynchronous job.

dropbox({
    resource: 'sharing/check_job_status',
    parameters: {
        'async_job_id': '34g93hh34h04y384084'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/check_remove_member_job_status (see docs)

Returns the status of an asynchronous job for sharing a folder.

dropbox({
    resource: 'sharing/check_remove_member_job_status',
    parameters: {
        'async_job_id': '34g93hh34h04y384084'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/check_share_job_status (see docs)

Returns the status of an asynchronous job for sharing a folder.

dropbox({
    resource: 'sharing/check_share_job_status',
    parameters: {
        'async_job_id': '34g93hh34h04y384084'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/create_shared_link_with_settings (see docs)

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).

dropbox({
    resource: 'sharing/create_shared_link_with_settings',
    parameters: {
        'path': '/Prime_Numbers.txt',
        'settings': {
            'requested_visibility': 'public'
        }
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/get_file_metadata (see docs)

Returns shared file metadata.

dropbox({
    resource: 'sharing/get_file_metadata',
    parameters: {
        'file': 'id:3kmLmQFnf1AAAAAAAAAAAw',
        'actions': []
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/get_file_metadata/batch (see docs)

Returns shared file metadata.

dropbox({
    resource: 'sharing/get_file_metadata/batch',
    parameters: {
        'files': ['id:3kmLmQFnf1AAAAAAAAAAAw', 'id:VvTaJu2VZzAAAAAAAAAADQ'],
        'actions': []
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/get_folder_metadata (see docs)

Returns shared folder metadata by its folder ID.

dropbox({
    resource: 'sharing/get_folder_metadata',
    parameters: {
        'shared_folder_id': '84528192421',
        'actions': []
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/get_shared_link_file (see docs)

Download the shared link's file from a user's Dropbox.

const stream = dropbox({
    resource: 'sharing/get_shared_link_file',
    parameters: {
        'url': 'https://www.dropbox.com/s/2sn712vy1ovegw8/Prime_Numbers.txt?dl=0',
        'path': '/Prime_Numbers.txt'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

stream
    .pipe(fs.createWriteStream('/Prime_Numbers.txt')); //pipe the stream

sharing/get_shared_link_metadata (see docs)

Get the shared link's metadata.

dropbox({
    resource: 'sharing/get_shared_link_metadata',
    parameters: {
        'url': 'https://www.dropbox.com/s/2sn712vy1ovegw8/Prime_Numbers.txt?dl=0',
        'path': '/Prime_Numbers.txt'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/list_file_members (see docs)

Use to obtain the members who have been invited to a file, both inherited and uninherited members.

dropbox({
    resource: 'sharing/list_file_members',
    parameters: {
        'file': 'id:3kmLmQFnf1AAAAAAAAAAAw',
        'include_inherited': true,
        'limit': 100
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/list_file_members/batch (see docs)

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.

dropbox({
    resource: 'sharing/list_file_members/batch',
    parameters: {
        'files': ['id:3kmLmQFnf1AAAAAAAAAAAw', 'id:VvTaJu2VZzAAAAAAAAAADQ'],
        'limit': 10
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/list_file_members/continue (see docs)

Once a cursor has been retrieved from list_file_members or list_file_members/batch, use this to paginate through all shared file members.

dropbox({
    resource: 'sharing/list_file_members/continue',
    parameters: {
        'cursor': 'ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/list_folder_members (see docs)

Returns shared folder membership by its folder ID.

dropbox({
    resource: 'sharing/list_folder_members',
    parameters: {
        'shared_folder_id': '84528192421',
        'actions': [],
        'limit': 10
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/list_folder_members/continue (see docs)

Once a cursor has been retrieved from list_folder_members, use this to paginate through all shared folder members.

dropbox({
    resource: 'sharing/list_folder_members/continue',
    parameters: {
        'cursor': 'ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/list_folders (see docs)

Return the list of all shared folders the current user has access to.

dropbox({
    resource: 'sharing/list_folders',
    parameters: {
        'limit': 100,
        'actions': []
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/list_folders/continue (see docs)

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.

dropbox({
    resource: 'sharing/list_folders/continue',
    parameters: {
        'cursor': 'ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/list_mountable_folders (see docs)

Return the list of all shared folders the current user can mount or unmount.

dropbox({
    resource: 'sharing/list_mountable_folders',
    parameters: {
        'limit': 100,
        'actions': []
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/list_mountable_folders/continue (see docs)

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.

dropbox({
    resource: 'sharing/list_mountable_folders/continue',
    parameters: {
        'cursor': 'ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/list_received_files (see docs)

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.

dropbox({
    resource: 'sharing/list_received_files',
    parameters: {
        'limit': 100,
        'actions': []
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/list_received_files/continue (see docs)

Get more results with a cursor from list_received_files.

dropbox({
    resource: 'sharing/list_received_files/continue',
    parameters: {
        'cursor': 'AzJJbGlzdF90eXBdofe9c3RPbGlzdGFyZ3NfYnlfZ2lkMRhcbric7Rdog9emfGRlc2MCRWxpbWl0BGRId'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/list_shared_links (see docs)

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.

dropbox({
    resource: 'sharing/list_shared_links',
    parameters: {
        'cursor': 'ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/modify_shared_link_settings (see docs)

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.

dropbox({
    resource: 'sharing/modify_shared_link_settings',
    parameters: {
        'url': 'https://www.dropbox.com/s/2sn712vy1ovegw8/Prime_Numbers.txt?dl=0',
        'settings': {
            'requested_visibility': 'public'
        },
        'remove_expiration': false
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/mount_folder (see docs)

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.

dropbox({
    resource: 'sharing/mount_folder',
    parameters: {
        'shared_folder_id': '84528192421'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/relinquish_file_membership (see docs)

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.

dropbox({
    resource: 'sharing/relinquish_file_membership',
    parameters: {
        'file': 'id:3kmLmQFnf1AAAAAAAAAAAw'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/relinquish_folder_membership (see docs)

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.

dropbox({
    resource: 'sharing/relinquish_folder_membership',
    parameters: {
        'shared_folder_id': '84528192421',
        'leave_a_copy': false
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/remove_file_member_2 (see docs)

Removes a specified member from the file.

dropbox({
    resource: 'sharing/remove_file_member_2',
    parameters: {
        'file': 'id:3kmLmQFnf1AAAAAAAAAAAw',
        'member': {
            '.tag': 'email',
            'email': '[email protected]'
        }
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/remove_folder_member (see docs)

Allows an owner or editor (if the ACL update policy allows) of a shared folder to remove another member.

dropbox({
    resource: 'sharing/remove_folder_member',
    parameters: {
        'shared_folder_id': '84528192421',
        'member': {
            '.tag': 'email',
            'email': '[email protected]'
        },
        'leave_a_copy': false
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/revoke_shared_link (see docs)

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.

dropbox({
    resource: 'sharing/revoke_shared_link',
    parameters: {
        'url': 'https://www.dropbox.com/s/2sn712vy1ovegw8/Prime_Numbers.txt?dl=0'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/set_access_inheritance (see docs)

Change the inheritance policy of an existing Shared Folder. Only permitted for shared folders in a shared team root. 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.

dropbox({
    resource: 'sharing/set_access_inheritance',
    parameters: {
        'shared_folder_id': '84528192421',
        'access_inheritance': 'inherit'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/share_folder (see docs)

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.

dropbox({
    resource: 'sharing/share_folder',
    parameters: {
        'path': '/example/workspace',
        'acl_update_policy': 'editors',
        'force_async': false,
        'member_policy': 'team',
        'shared_link_policy': 'members',
        'access_inheritance': 'inherit'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/transfer_folder (see docs)

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.

dropbox({
    resource: 'sharing/transfer_folder',
    parameters: {
        'shared_folder_id': '84528192421',
        'to_dropbox_id': 'dbid:AAEufNrMPSPe0dMQijRP0N_aZtBJRm26W4Q'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/unmount_folder (see docs)

The current user unmounts the designated folder. They can re-mount the folder at a later time using mount_folder.

dropbox({
    resource: 'sharing/unmount_folder',
    parameters: {
        'shared_folder_id': '84528192421'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/unshare_file (see docs)

Remove all members from this file. Does not remove inherited members.

dropbox({
    resource: 'sharing/unshare_file',
    parameters: {
        'file': 'id:3kmLmQFnf1AAAAAAAAAAAw'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/unshare_folder (see docs)

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.

dropbox({
    resource: 'sharing/unshare_folder',
    parameters: {
        'shared_folder_id': '84528192421',
        'leave_a_copy': false
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/update_file_member (see docs)

Changes a member's access on a shared file.

dropbox({
    resource: 'sharing/update_file_member',
    parameters: {
        'file': 'id:3kmLmQFnf1AAAAAAAAAAAw',
        'member': {
            '.tag': 'email',
            'email': '[email protected]'
        },
        'access_level': 'viewer'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/update_folder_member (see docs)

Allows an owner or editor of a shared folder to update another member's permissions.

dropbox({
    resource: 'sharing/update_folder_member',
    parameters: {
        'shared_folder_id': '84528192421',
        'member': {
            '.tag': 'email',
            'email': '[email protected]'
        },
        'access_level': 'editor'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

sharing/update_folder_policy (see docs)

Update the sharing policies for a shared folder. User must have AccessLevel.owner access to the shared folder to update its policies.

dropbox({
    resource: 'sharing/update_folder_policy',
    parameters: {
        'shared_folder_id': '84528192421',
        'member_policy': 'team',
        'acl_update_policy': 'owner',
        'shared_link_policy': 'members'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

users/get_account (see docs)

Get information about a user's account.

dropbox({
    resource: 'users/get_account',
    parameters: {
        'account_id': 'dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

users/get_account_batch (see docs)

Get information about multiple user accounts. At most 300 accounts may be queried per request.

dropbox({
    resource: 'users/get_account_batch',
    parameters: {
        'account_ids': ['dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc', 'dbid:AAH1Vcz-DVoRDeixtr_OA8oUGgiqhs4XPOQ']
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

users/get_current_account (see docs)

Get information about the current user's account.

dropbox({
    resource: 'users/get_current_account'
}, (err, result, response) => {
    //see docs for `result` parameters
});

users/get_space_usage (see docs)

Get the space usage information for the current user's account.

dropbox({
    resource: 'users/get_space_usage'
}, (err, result, response) => {
    //see docs for `result` parameters
});

deprecated/alpha/get_metadata (see docs)

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.

dropbox({
    resource: 'deprecated/alpha/get_metadata',
    parameters: {
        'path': '/Homework/math',
        'include_media_info': false,
        'include_deleted': false,
        'include_has_explicit_shared_members': false
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

deprecated/alpha/upload (see docs)

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.

const stream = dropbox({
    resource: 'deprecated/alpha/upload',
    parameters: {
        'path': '/Homework/math/Matrices.txt',
        'mode': 'add',
        'autorename': true,
        'mute': false,
        'strict_conflict': false
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

fs.createReadStream('/Homework/math/Matrices.txt').pipe(stream);

deprecated/properties/add (see docs)

No description

dropbox({
    resource: 'deprecated/properties/add',
    parameters: {
        'path': '/my_awesome/word.docx',
        'property_groups': [{
            'template_id': 'ptid:1a5n2i6d3OYEAAAAAAAAAYa',
            'fields': [{
                'name': 'Security Policy',
                'value': 'Confidential'
            }]
        }]
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

deprecated/properties/overwrite (see docs)

No description

dropbox({
    resource: 'deprecated/properties/overwrite',
    parameters: {
        'path': '/my_awesome/word.docx',
        'property_groups': [{
            'template_id': 'ptid:1a5n2i6d3OYEAAAAAAAAAYa',
            'fields': [{
                'name': 'Security Policy',
                'value': 'Confidential'
            }]
        }]
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

deprecated/properties/remove (see docs)

No description

dropbox({
    resource: 'deprecated/properties/remove',
    parameters: {
        'path': '/my_awesome/word.docx',
        'property_template_ids': ['ptid:1a5n2i6d3OYEAAAAAAAAAYa']
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

deprecated/properties/template/get (see docs)

No description

dropbox({
    resource: 'deprecated/properties/template/get',
    parameters: {
        'template_id': 'ptid:1a5n2i6d3OYEAAAAAAAAAYa'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

deprecated/properties/template/list (see docs)

No description

dropbox({
    resource: 'deprecated/properties/template/list'
}, (err, result, response) => {
    //see docs for `result` parameters
});

deprecated/properties/update (see docs)

No description

dropbox({
    resource: 'deprecated/properties/update',
    parameters: {
        'path': '/my_awesome/word.docx',
        'update_property_groups': [{
            'template_id': 'ptid:1a5n2i6d3OYEAAAAAAAAAYa',
            'add_or_update_fields': [{
                'name': 'Security Policy',
                'value': 'Confidential'
            }],
            'remove_fields': []
        }]
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

deprecated/change_file_member_access (see docs)

Identical to update_file_member but with less information returned.

dropbox({
    resource: 'deprecated/change_file_member_access',
    parameters: {
        'file': 'id:3kmLmQFnf1AAAAAAAAAAAw',
        'member': {
            '.tag': 'email',
            'email': '[email protected]'
        },
        'access_level': 'viewer'
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

deprecated/create_shared_link (see docs)

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.

dropbox({
    resource: 'deprecated/create_shared_link',
    parameters: {
        'path': '/Homework/Math/Prime_Numbers.txt',
        'short_url': false
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

deprecated/get_shared_links (see docs)

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.

dropbox({
    resource: 'deprecated/get_shared_links',
    parameters: {
        'path': ''
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});

deprecated/remove_file_member (see docs)

Identical to remove_file_member_2 but with less information returned.

dropbox({
    resource: 'deprecated/remove_file_member',
    parameters: {
        'file': 'id:3kmLmQFnf1AAAAAAAAAAAw',
        'member': {
            '.tag': 'email',
            'email': '[email protected]'
        }
    }
}, (err, result, response) => {
    //see docs for `result` parameters
});