Class: DropboxTeam

DropboxTeam

The Dropbox SDK class that provides access to team endpoints.

new DropboxTeam(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.

Extends

Methods


actAsUser(userId)

Returns an instance of Dropbox that can make calls to user api endpoints on behalf of the passed user id, using the team access token.
Parameters:
Name Type Description
userId String The user id to use the Dropbox class as
Returns:
An instance of Dropbox used to make calls to user api endpoints
Type
Dropbox

authenticateWithCordova(successCallback, errorCallback)

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

getAccessToken()

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

getAccessTokenFromCode(redirectUri, code)

Get an OAuth2 access token from an OAuth2 Code.
Parameters:
Name Type Description
redirectUri String A URL to redirect the user to after authenticating. This must be added to your app through the admin interface.
code String An OAuth2 code.
Inherited From:

getAuthenticationUrl(redirectUri [, state] [, authType])

Get a URL that can be used to authenticate users for the Dropbox API.
Parameters:
Name Type Argument Default 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.
authType String <optional>
token auth type, defaults to 'token', other option is 'code'
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

getClientSecret()

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

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

setClientSecret(clientSecret)

Set the client secret
Parameters:
Name Type Description
clientSecret String Your app's client secret
Inherited From:
Returns:
Type
undefined

teamDevicesListMemberDevices(arg)

List all device sessions of a team's member.
Parameters:
Name Type Description
arg TeamListMemberDevicesArg The request parameters.
Returns:
Type
Promise.<TeamListMemberDevicesResult, Error.<TeamListMemberDevicesError>>

teamDevicesListMembersDevices(arg)

List all device sessions of a team. Permission : Team member file access.
Parameters:
Name Type Description
arg TeamListMembersDevicesArg The request parameters.
Returns:
Type
Promise.<TeamListMembersDevicesResult, Error.<TeamListMembersDevicesError>>

teamDevicesListTeamDevices(arg)

List all device sessions of a team. Permission : Team member file access.
Parameters:
Name Type Description
arg TeamListTeamDevicesArg The request parameters.
Deprecated:
  • Yes
Returns:
Type
Promise.<TeamListTeamDevicesResult, Error.<TeamListTeamDevicesError>>

teamDevicesRevokeDeviceSession(arg)

Revoke a device session of a team's member.
Parameters:
Name Type Description
arg TeamRevokeDeviceSessionArg The request parameters.
Returns:
Type
Promise.<void, Error.<TeamRevokeDeviceSessionError>>

teamDevicesRevokeDeviceSessionBatch(arg)

Revoke a list of device sessions of team members.
Parameters:
Name Type Description
arg TeamRevokeDeviceSessionBatchArg The request parameters.
Returns:
Type
Promise.<TeamRevokeDeviceSessionBatchResult, Error.<TeamRevokeDeviceSessionBatchError>>

teamFeaturesGetValues(arg)

Get the values for one or more featues. This route allows you to check your account's capability for what feature you can access or what value you have for certain features. Permission : Team information.
Parameters:
Name Type Description
arg TeamFeaturesGetValuesBatchArg The request parameters.
Returns:
Type
Promise.<TeamFeaturesGetValuesBatchResult, Error.<TeamFeaturesGetValuesBatchError>>

teamGetInfo(arg)

Retrieves information about a team.
Parameters:
Name Type Description
arg void The request parameters.
Returns:
Type
Promise.<TeamTeamGetInfoResult, Error.<void>>

teamGroupsCreate(arg)

Creates a new, empty group, with a requested name. Permission : Team member management.
Parameters:
Name Type Description
arg TeamGroupCreateArg The request parameters.
Returns:
Type
Promise.<TeamGroupFullInfo, Error.<TeamGroupCreateError>>

teamGroupsDelete(arg)

Deletes a group. The group is deleted immediately. However the revoking of group-owned resources may take additional time. Use the groups/job_status/get to determine whether this process has completed. Permission : Team member management.
Parameters:
Name Type Description
arg TeamGroupSelector The request parameters.
Returns:
Type
Promise.<AsyncLaunchEmptyResult, Error.<TeamGroupDeleteError>>

teamGroupsGetInfo(arg)

Retrieves information about one or more groups. Note that the optional field GroupFullInfo.members is not returned for system-managed groups. Permission : Team Information.
Parameters:
Name Type Description
arg TeamGroupsSelector The request parameters.
Returns:
Type
Promise.<Object, Error.<TeamGroupsGetInfoError>>

teamGroupsJobStatusGet(arg)

Once an async_job_id is returned from groups/delete, groups/members/add , or groups/members/remove use this method to poll the status of granting/revoking group members' access to group-owned resources. Permission : Team member management.
Parameters:
Name Type Description
arg AsyncPollArg The request parameters.
Returns:
Type
Promise.<AsyncPollEmptyResult, Error.<TeamGroupsPollError>>

teamGroupsList(arg)

Lists groups on a team. Permission : Team Information.
Parameters:
Name Type Description
arg TeamGroupsListArg The request parameters.
Returns:
Type
Promise.<TeamGroupsListResult, Error.<void>>

teamGroupsListContinue(arg)

Once a cursor has been retrieved from groups/list, use this to paginate through all groups. Permission : Team Information.
Parameters:
Name Type Description
arg TeamGroupsListContinueArg The request parameters.
Returns:
Type
Promise.<TeamGroupsListResult, Error.<TeamGroupsListContinueError>>

teamGroupsMembersAdd(arg)

Adds members to a group. The members are added immediately. However the granting of group-owned resources may take additional time. Use the groups/job_status/get to determine whether this process has completed. Permission : Team member management.
Parameters:
Name Type Description
arg TeamGroupMembersAddArg The request parameters.
Returns:
Type
Promise.<TeamGroupMembersChangeResult, Error.<TeamGroupMembersAddError>>

teamGroupsMembersList(arg)

Lists members of a group. Permission : Team Information.
Parameters:
Name Type Description
arg TeamGroupsMembersListArg The request parameters.
Returns:
Type
Promise.<TeamGroupsMembersListResult, Error.<TeamGroupSelectorError>>

teamGroupsMembersListContinue(arg)

Once a cursor has been retrieved from groups/members/list, use this to paginate through all members of the group. Permission : Team information.
Parameters:
Name Type Description
arg TeamGroupsMembersListContinueArg The request parameters.
Returns:
Type
Promise.<TeamGroupsMembersListResult, Error.<TeamGroupsMembersListContinueError>>

teamGroupsMembersRemove(arg)

Removes members from a group. The members are removed immediately. However the revoking of group-owned resources may take additional time. Use the groups/job_status/get to determine whether this process has completed. This method permits removing the only owner of a group, even in cases where this is not possible via the web client. Permission : Team member management.
Parameters:
Name Type Description
arg TeamGroupMembersRemoveArg The request parameters.
Returns:
Type
Promise.<TeamGroupMembersChangeResult, Error.<TeamGroupMembersRemoveError>>

teamGroupsMembersSetAccessType(arg)

Sets a member's access type in a group. Permission : Team member management.
Parameters:
Name Type Description
arg TeamGroupMembersSetAccessTypeArg The request parameters.
Returns:
Type
Promise.<Object, Error.<TeamGroupMemberSetAccessTypeError>>

teamGroupsUpdate(arg)

Updates a group's name and/or external ID. Permission : Team member management.
Parameters:
Name Type Description
arg TeamGroupUpdateArgs The request parameters.
Returns:
Type
Promise.<TeamGroupFullInfo, Error.<TeamGroupUpdateError>>

teamLinkedAppsListMemberLinkedApps(arg)

List all linked applications of the team member. Note, this endpoint does not list any team-linked applications.
Parameters:
Name Type Description
arg TeamListMemberAppsArg The request parameters.
Returns:
Type
Promise.<TeamListMemberAppsResult, Error.<TeamListMemberAppsError>>

teamLinkedAppsListMembersLinkedApps(arg)

List all applications linked to the team members' accounts. Note, this endpoint does not list any team-linked applications.
Parameters:
Name Type Description
arg TeamListMembersAppsArg The request parameters.
Returns:
Type
Promise.<TeamListMembersAppsResult, Error.<TeamListMembersAppsError>>

teamLinkedAppsListTeamLinkedApps(arg)

List all applications linked to the team members' accounts. Note, this endpoint doesn't list any team-linked applications.
Parameters:
Name Type Description
arg TeamListTeamAppsArg The request parameters.
Deprecated:
  • Yes
Returns:
Type
Promise.<TeamListTeamAppsResult, Error.<TeamListTeamAppsError>>

teamLinkedAppsRevokeLinkedApp(arg)

Revoke a linked application of the team member.
Parameters:
Name Type Description
arg TeamRevokeLinkedApiAppArg The request parameters.
Returns:
Type
Promise.<void, Error.<TeamRevokeLinkedAppError>>

teamLinkedAppsRevokeLinkedAppBatch(arg)

Revoke a list of linked applications of the team members.
Parameters:
Name Type Description
arg TeamRevokeLinkedApiAppBatchArg The request parameters.
Returns:
Type
Promise.<TeamRevokeLinkedAppBatchResult, Error.<TeamRevokeLinkedAppBatchError>>

teamMembersAdd(arg)

Adds members to a team. Permission : Team member management A maximum of 20 members can be specified in a single call. If no Dropbox account exists with the email address specified, a new Dropbox account will be created with the given email address, and that account will be invited to the team. If a personal Dropbox account exists with the email address specified in the call, this call will create a placeholder Dropbox account for the user on the team and send an email inviting the user to migrate their existing personal account onto the team. Team member management apps are required to set an initial given_name and surname for a user to use in the team invitation and for 'Perform as team member' actions taken on the user before they become 'active'.
Parameters:
Name Type Description
arg TeamMembersAddArg The request parameters.
Returns:
Type
Promise.<TeamMembersAddLaunch, Error.<void>>

teamMembersAddJobStatusGet(arg)

Once an async_job_id is returned from members/add , use this to poll the status of the asynchronous request. Permission : Team member management.
Parameters:
Name Type Description
arg AsyncPollArg The request parameters.
Returns:
Type
Promise.<TeamMembersAddJobStatus, Error.<AsyncPollError>>

teamMembersGetInfo(arg)

Returns information about multiple team members. Permission : Team information This endpoint will return MembersGetInfoItem.id_not_found, for IDs (or emails) that cannot be matched to a valid team member.
Parameters:
Name Type Description
arg TeamMembersGetInfoArgs The request parameters.
Returns:
Type
Promise.<Object, Error.<TeamMembersGetInfoError>>

teamMembersList(arg)

Lists members of a team. Permission : Team information.
Parameters:
Name Type Description
arg TeamMembersListArg The request parameters.
Returns:
Type
Promise.<TeamMembersListResult, Error.<TeamMembersListError>>

teamMembersListContinue(arg)

Once a cursor has been retrieved from members/list, use this to paginate through all team members. Permission : Team information.
Parameters:
Name Type Description
arg TeamMembersListContinueArg The request parameters.
Returns:
Type
Promise.<TeamMembersListResult, Error.<TeamMembersListContinueError>>

teamMembersMoveFormerMemberFiles(arg)

Moves removed member's files to a different member. This endpoint initiates an asynchronous job. To obtain the final result of the job, the client should periodically poll members/move_former_member_files/job_status/check. Permission : Team member management.
Parameters:
Name Type Description
arg TeamMembersDataTransferArg The request parameters.
Returns:
Type
Promise.<AsyncLaunchEmptyResult, Error.<TeamMembersTransferFormerMembersFilesError>>

teamMembersMoveFormerMemberFilesJobStatusCheck(arg)

Once an async_job_id is returned from members/move_former_member_files , use this to poll the status of the asynchronous request. Permission : Team member management.
Parameters:
Name Type Description
arg AsyncPollArg The request parameters.
Returns:
Type
Promise.<AsyncPollEmptyResult, Error.<AsyncPollError>>

teamMemberSpaceLimitsExcludedUsersAdd(arg)

Add users to member space limits excluded users list.
Parameters:
Name Type Description
arg TeamExcludedUsersUpdateArg The request parameters.
Returns:
Type
Promise.<TeamExcludedUsersUpdateResult, Error.<TeamExcludedUsersUpdateError>>

teamMemberSpaceLimitsExcludedUsersList(arg)

List member space limits excluded users.
Parameters:
Name Type Description
arg TeamExcludedUsersListArg The request parameters.
Returns:
Type
Promise.<TeamExcludedUsersListResult, Error.<TeamExcludedUsersListError>>

teamMemberSpaceLimitsExcludedUsersListContinue(arg)

Continue listing member space limits excluded users.
Parameters:
Name Type Description
arg TeamExcludedUsersListContinueArg The request parameters.
Returns:
Type
Promise.<TeamExcludedUsersListResult, Error.<TeamExcludedUsersListContinueError>>

teamMemberSpaceLimitsExcludedUsersRemove(arg)

Remove users from member space limits excluded users list.
Parameters:
Name Type Description
arg TeamExcludedUsersUpdateArg The request parameters.
Returns:
Type
Promise.<TeamExcludedUsersUpdateResult, Error.<TeamExcludedUsersUpdateError>>

teamMemberSpaceLimitsGetCustomQuota(arg)

Get users custom quota. Returns none as the custom quota if none was set. A maximum of 1000 members can be specified in a single call.
Parameters:
Name Type Description
arg TeamCustomQuotaUsersArg The request parameters.
Returns:
Type
Promise.<Array.<TeamCustomQuotaResult>, Error.<TeamCustomQuotaError>>

teamMemberSpaceLimitsRemoveCustomQuota(arg)

Remove users custom quota. A maximum of 1000 members can be specified in a single call.
Parameters:
Name Type Description
arg TeamCustomQuotaUsersArg The request parameters.
Returns:
Type
Promise.<Array.<TeamRemoveCustomQuotaResult>, Error.<TeamCustomQuotaError>>

teamMemberSpaceLimitsSetCustomQuota(arg)

Set users custom quota. Custom quota has to be at least 15GB. A maximum of 1000 members can be specified in a single call.
Parameters:
Name Type Description
arg TeamSetCustomQuotaArg The request parameters.
Returns:
Type
Promise.<Array.<TeamCustomQuotaResult>, Error.<TeamSetCustomQuotaError>>

teamMembersRecover(arg)

Recover a deleted member. Permission : Team member management Exactly one of team_member_id, email, or external_id must be provided to identify the user account.
Parameters:
Name Type Description
arg TeamMembersRecoverArg The request parameters.
Returns:
Type
Promise.<void, Error.<TeamMembersRecoverError>>

teamMembersRemove(arg)

Removes a member from a team. Permission : Team member management Exactly one of team_member_id, email, or external_id must be provided to identify the user account. Accounts can be recovered via members/recover for a 7 day period or until the account has been permanently deleted or transferred to another account (whichever comes first). Calling members/add while a user is still recoverable on your team will return with MemberAddResult.user_already_on_team. Accounts can have their files transferred via the admin console for a limited time, based on the version history length associated with the team (120 days for most teams). This endpoint may initiate an asynchronous job. To obtain the final result of the job, the client should periodically poll members/remove/job_status/get.
Parameters:
Name Type Description
arg TeamMembersRemoveArg The request parameters.
Returns:
Type
Promise.<AsyncLaunchEmptyResult, Error.<TeamMembersRemoveError>>

teamMembersRemoveJobStatusGet(arg)

Once an async_job_id is returned from members/remove , use this to poll the status of the asynchronous request. Permission : Team member management.
Parameters:
Name Type Description
arg AsyncPollArg The request parameters.
Returns:
Type
Promise.<AsyncPollEmptyResult, Error.<AsyncPollError>>

teamMembersSendWelcomeEmail(arg)

Sends welcome email to pending team member. Permission : Team member management Exactly one of team_member_id, email, or external_id must be provided to identify the user account. No-op if team member is not pending.
Parameters:
Name Type Description
arg TeamUserSelectorArg The request parameters.
Returns:
Type
Promise.<void, Error.<TeamMembersSendWelcomeError>>

teamMembersSetAdminPermissions(arg)

Updates a team member's permissions. Permission : Team member management.
Parameters:
Name Type Description
arg TeamMembersSetPermissionsArg The request parameters.
Returns:
Type
Promise.<TeamMembersSetPermissionsResult, Error.<TeamMembersSetPermissionsError>>

teamMembersSetProfile(arg)

Updates a team member's profile. Permission : Team member management.
Parameters:
Name Type Description
arg TeamMembersSetProfileArg The request parameters.
Returns:
Type
Promise.<TeamTeamMemberInfo, Error.<TeamMembersSetProfileError>>

teamMembersSuspend(arg)

Suspend a member from a team. Permission : Team member management Exactly one of team_member_id, email, or external_id must be provided to identify the user account.
Parameters:
Name Type Description
arg TeamMembersDeactivateArg The request parameters.
Returns:
Type
Promise.<void, Error.<TeamMembersSuspendError>>

teamMembersUnsuspend(arg)

Unsuspend a member from a team. Permission : Team member management Exactly one of team_member_id, email, or external_id must be provided to identify the user account.
Parameters:
Name Type Description
arg TeamMembersUnsuspendArg The request parameters.
Returns:
Type
Promise.<void, Error.<TeamMembersUnsuspendError>>

teamNamespacesList(arg)

Returns a list of all team-accessible namespaces. This list includes team folders, shared folders containing team members, team members' home namespaces, and team members' app folders. Home namespaces and app folders are always owned by this team or members of the team, but shared folders may be owned by other users or other teams. Duplicates may occur in the list.
Parameters:
Name Type Description
arg TeamTeamNamespacesListArg The request parameters.
Returns:
Type
Promise.<TeamTeamNamespacesListResult, Error.<TeamTeamNamespacesListError>>

teamNamespacesListContinue(arg)

Once a cursor has been retrieved from namespaces/list, use this to paginate through all team-accessible namespaces. Duplicates may occur in the list.
Parameters:
Name Type Description
arg TeamTeamNamespacesListContinueArg The request parameters.
Returns:
Type
Promise.<TeamTeamNamespacesListResult, Error.<TeamTeamNamespacesListContinueError>>

teamPropertiesTemplateAdd(arg)

Permission : Team member file access.
Parameters:
Name Type Description
arg FilePropertiesAddTemplateArg The request parameters.
Deprecated:
  • Yes
Returns:
Type
Promise.<FilePropertiesAddTemplateResult, Error.<FilePropertiesModifyTemplateError>>

teamPropertiesTemplateGet(arg)

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

teamPropertiesTemplateList(arg)

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

teamPropertiesTemplateUpdate(arg)

Permission : Team member file access.
Parameters:
Name Type Description
arg FilePropertiesUpdateTemplateArg The request parameters.
Deprecated:
  • Yes
Returns:
Type
Promise.<FilePropertiesUpdateTemplateResult, Error.<FilePropertiesModifyTemplateError>>

teamReportsGetActivity(arg)

Retrieves reporting data about a team's user activity.
Parameters:
Name Type Description
arg TeamDateRange The request parameters.
Returns:
Type
Promise.<TeamGetActivityReport, Error.<TeamDateRangeError>>

teamReportsGetDevices(arg)

Retrieves reporting data about a team's linked devices.
Parameters:
Name Type Description
arg TeamDateRange The request parameters.
Returns:
Type
Promise.<TeamGetDevicesReport, Error.<TeamDateRangeError>>

teamReportsGetMembership(arg)

Retrieves reporting data about a team's membership.
Parameters:
Name Type Description
arg TeamDateRange The request parameters.
Returns:
Type
Promise.<TeamGetMembershipReport, Error.<TeamDateRangeError>>

teamReportsGetStorage(arg)

Retrieves reporting data about a team's storage usage.
Parameters:
Name Type Description
arg TeamDateRange The request parameters.
Returns:
Type
Promise.<TeamGetStorageReport, Error.<TeamDateRangeError>>

teamTeamFolderActivate(arg)

Sets an archived team folder's status to active. Permission : Team member file access.
Parameters:
Name Type Description
arg TeamTeamFolderIdArg The request parameters.
Returns:
Type
Promise.<TeamTeamFolderMetadata, Error.<TeamTeamFolderActivateError>>

teamTeamFolderArchive(arg)

Sets an active team folder's status to archived and removes all folder and file members. Permission : Team member file access.
Parameters:
Name Type Description
arg TeamTeamFolderArchiveArg The request parameters.
Returns:
Type
Promise.<TeamTeamFolderArchiveLaunch, Error.<TeamTeamFolderArchiveError>>

teamTeamFolderArchiveCheck(arg)

Returns the status of an asynchronous job for archiving a team folder. Permission : Team member file access.
Parameters:
Name Type Description
arg AsyncPollArg The request parameters.
Returns:
Type
Promise.<TeamTeamFolderArchiveJobStatus, Error.<AsyncPollError>>

teamTeamFolderCreate(arg)

Creates a new, active, team folder with no members. Permission : Team member file access.
Parameters:
Name Type Description
arg TeamTeamFolderCreateArg The request parameters.
Returns:
Type
Promise.<TeamTeamFolderMetadata, Error.<TeamTeamFolderCreateError>>

teamTeamFolderGetInfo(arg)

Retrieves metadata for team folders. Permission : Team member file access.
Parameters:
Name Type Description
arg TeamTeamFolderIdListArg The request parameters.
Returns:
Type
Promise.<Array.<TeamTeamFolderGetInfoItem>, Error.<void>>

teamTeamFolderList(arg)

Lists all team folders. Permission : Team member file access.
Parameters:
Name Type Description
arg TeamTeamFolderListArg The request parameters.
Returns:
Type
Promise.<TeamTeamFolderListResult, Error.<TeamTeamFolderListError>>

teamTeamFolderListContinue(arg)

Once a cursor has been retrieved from team_folder/list, use this to paginate through all team folders. Permission : Team member file access.
Parameters:
Name Type Description
arg TeamTeamFolderListContinueArg The request parameters.
Returns:
Type
Promise.<TeamTeamFolderListResult, Error.<TeamTeamFolderListContinueError>>

teamTeamFolderPermanentlyDelete(arg)

Permanently deletes an archived team folder. Permission : Team member file access.
Parameters:
Name Type Description
arg TeamTeamFolderIdArg The request parameters.
Returns:
Type
Promise.<void, Error.<TeamTeamFolderPermanentlyDeleteError>>

teamTeamFolderRename(arg)

Changes an active team folder's name. Permission : Team member file access.
Parameters:
Name Type Description
arg TeamTeamFolderRenameArg The request parameters.
Returns:
Type
Promise.<TeamTeamFolderMetadata, Error.<TeamTeamFolderRenameError>>

teamTeamFolderUpdateSyncSettings(arg)

Updates the sync settings on a team folder or its contents. Use of this endpoint requires that the team has team selective sync enabled.
Parameters:
Name Type Description
arg TeamTeamFolderUpdateSyncSettingsArg The request parameters.
Returns:
Type
Promise.<TeamTeamFolderMetadata, Error.<TeamTeamFolderUpdateSyncSettingsError>>

teamTokenGetAuthenticatedAdmin(arg)

Returns the member profile of the admin who generated the team access token used to make the call.
Parameters:
Name Type Description
arg void The request parameters.
Returns:
Type
Promise.<TeamTokenGetAuthenticatedAdminResult, Error.<TeamTokenGetAuthenticatedAdminError>>