We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
deeptir94
2 years agoExplorer | Level 4
API to upload files to folders outside of user account folder
Hello, I need to upload files using API to a folder that is outside of my current user account (the user ID I’m logged in with). However, when using the API, the folder structure is being cr...
iNeil
Dropbox Community Moderator
2 years agoHello @deeptir94,
As mentioned by Здравко, by default, API calls to the Dropbox API operate within the "member folder" of the connected account. You can configure the API calls to operate in the team space that is outside of the "member folder" by setting the "Dropbox-API-Path-Root" header in your Dropbox API request.
Below I have provided an example "Dropbox-API-Path-Root" header value to access the team space:
Dropbox-Api-Path-Root: {".tag": "root", "root": "YOUR_ROOT_NAMESPACE_ID"}You should be able to identify the root_namespace_id by executing the 2/users/get_current_account endpoint. You can also test the 2/users/get_current_account endpoint using our Dropbox API explorer.
For further information, please review the following links:
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!