We Want to Hear From You! What Do You Want to See on the Community? Tell us here!

Forum Discussion

Mikamadgik's avatar
Mikamadgik
New member | Level 2
2 months ago

Team folder from API

Hello,

I am currently using an app with the Dropbox API. I can access the user's folder without any issues — it works well. A user also wants to connect their account, but they are part of a business account and would like to access the team folders.

I tried connecting with their account, but it always redirects me to their user folder, and I can't manage to access the team folders.
After searching through forums, I understood that I needed to create a specific Dropbox Business API app. So I looked everywhere, but I only found how to create a standard API app. This time, I made sure to select the team scopes (see screenshot).

However, when I initiate the connection, it generates an access_token and a refresh_token. I even managed to retrieve a dropbox_team_admin_id. But every time I try to access files, I get 400 error codes.

So my first questions are: did I actually create a Dropbox Business API app? The token I receive starts with sl. and I read that this is a standard token. So I would like to understand how to create a true Dropbox Business API app instead of a standard one.

Thank you in advance for your help.

 

1 Reply

  • iNeil's avatar
    iNeil
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    2 months ago

    Hello Mikamadgik​,

    By default, API calls to the Dropbox API operate in the "member folder" of the connected account, not the "team space" where the team folders are located. Accessing the team space doesn't require a Dropbox Business API app or team scopes. You can use a standard Dropbox API app to access the team space.

    You can configure API calls to operate in the "team space" by setting the "Dropbox-API-Path-Root" header with 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 link:

    If you need further assistance or have any questions, please let me know. 

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 9 months ago
411 Following

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 or Facebook.

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!