This is a collections of scripts for Dropbox.
Installation
Install node.js.
Clone/download the repo and install its dependencies
git clone https://github.com/rubengarciam/dropbox-scripts.git
cd dropbox-scripts
npm install
Configuration
You will need to configure src/config.js with the tokens and other ids for your team:
- TOKEN_USER - token for performing file actions on behalf of the user. Must be a full access token
- TOKEN_ADMIN - : token for performing file actions on behalf of the admin. Must be a full access token
- TOKEN_TMFA - team member file access token
- TOKEN_TMM - team member management token
- GROUP_PROJECT_CREATORS - a group that the admin is part of. Must be the group id
You can find the group id withouth using the API in the Admin Console:
- Go to https://www.dropbox.com/team/admin/groups
- Open the desired group that contains the admin
- The url should have the following structure: https://www.dropbox.com/team/admin/groups#/g:XXXXXXXX
- "g:XXXXXXXX" is the group id
Lists the number of files for a Dropbox user.
Requirements
TOKEN_USER
Parameters
node src/listFiles.js DEPTH
where:
- DEPTH is the folder tree depth you'd like use for aggregating the number of files. Use 0 if you just want to display the total number of files and folders
Creates a team folder for a new project based on a specific folder template and creates the associated edit/read groups
Requirements
TOKEN_ADMIN, TOKEN_TMFA, TOKEN_TMM, GROUP_PROJECT_CREATORS
Parameters
node src/newProject.js project-name template-path
where:
- project-name is the name of the project in question
- template-path the path to the template folder. The admin must have access to this folder