Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting Dropbox-API-Path-Root Header to Access Team Folders #207

Open
tommy-ec opened this issue Sep 21, 2023 · 4 comments
Open

Setting Dropbox-API-Path-Root Header to Access Team Folders #207

tommy-ec opened this issue Sep 21, 2023 · 4 comments

Comments

@tommy-ec
Copy link

I am currently utilizing the Dropbox PHP SDK within my project to automate the uploading of files from our server to Dropbox.

However, due to a recent migration of our Dropbox account to a "team space", I'm unable to access our core team folder because I have not found a way to set the Dropbox-API-Path-Root header within the SDK.

The challenge at hand is setting the SDK to define the team space as root so that it recognizes the correct directory structure for our team folders.

Through the Dropbox Team Files Guide (https://developers.dropbox.com/dbx-team-files-guide), it's clear that this functionality should be possible, but the SDK's current documentation does not explicitly outline how to accomplish this, hence my confusion and inability to implement the required changes.

Is there a way to set the Dropbox-API-Path-Root header within the SDK? Alternatively, do you have any recommendations on how to correctly address the 'team space' to access team files using the SDK?

Any help/guidance would be greatly appreciated.

Thank you!

@muhohokenya
Copy link

Hey Did you get a way through, for this particular issue?

@tommy-ec
Copy link
Author

tommy-ec commented Oct 4, 2023

Hey Did you get a way through, for this particular issue?

@muhohokenya - Unfortunately, a straightforward solution within the SDK wasn't found. To circumvent the problem, I created a shared folder and manually copied over the contents of the team folder before archiving the original team folder.

This move, while effective in ensuring our systems continued functioning, didn't come without its drawbacks. All existing sharing options and links were disrupted as a result. It was a challenging decision, but necessary given the circumstances.

It might not be the most elegant solution, but it served the purpose for the time being. It's my hope that Dropbox or the SDK will introduce a more streamlined solution for this specific situation in the near future.

@muhohokenya
Copy link

@tommy-ec It's amazing how you got the solution. I spent sometime as well, I copied the files from the src and updated the DropboxClient where I added Dropbox-API-Path-Root under the prepareRequest() method. It wasn't
the best approach but I needed the solution ASAP. Am glad you raised this issue and hoping it resolved as soon as possible.

@wetmarble
Copy link

I submitted a PR for this #208

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants