feat(dropbox): add root_namespace_id to access teams folder #5929
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Just started using this tool recently, it's a great project!
Still not very familiar with the codebase or golang, feel free to provide feedback and suggestions.
It's been quickly tested with my Dropbox Business account manually, now it's able to see teams folders.
Background
Related to #5126 and #5760
Sending Dropbox API request without a
Dropbox-API-Path-Root
header defaults to user home namespace.To access Dropbox Team Space, proper namespace needs to be provided.
Namespace IDs can be obtained from
/2/users/get_current_account
.For non-business users,
root_info.root_namespace_id
androot_info.home_namespace_id
seem to be identical values.For Business users, setting
root_namespace_id
inDropbox-API-Path-Root
header allows API client to start from a higher level root where the requesting user's personal home as well as other shared folders can be seen at the same time.Changes
Init
Dropbox-API-Path-Root
header inrequest
method whend.RootNamespaceId
is availableReferences