Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

Jistix's avatar
Jistix
Explorer | Level 3
4 years ago
Solved

Unable to access folders in Business account connected by OAuth2 with Team permission set in the App

We have an app with Team permissions checked. See attached screen shot.  When users connect our app to Dropbox via OAuth, the process is successful, but the users are not able to see any of their files or folders within our app. The app is scoped Full Dropbox.

 

When we create a second app, with scope set to Full Dropbox, and no Team permissions checked, then users with Personal accounts can connect our app to their Dropbox account, but users with Business accounts can not connect our app to their Business Dropbox account.

 

So:

  1. Do we need to two distinct Dropbox apps:  one for users with a Business Dropbox account, and one for user with a Personal Dropbox account?
  2. How do we enable our users who have a Business Dropbox account to view their folders in our app, after they connect Dropbox to our app through OAuth?

Greg-DB 

  • Jistix You do not need two distinct Dropbox apps. When using just "user" scopes, any kind of Dropbox account, Business or not, can be connected to your app. When using any "team" scopes though, only Dropbox Business teams can be connected to your app, and only Business teams admins can perform that authorization.

     

    You should only enabled the minimum set of scopes needed for your app. If you need both user and team scopes, you can use a single app with both enabled, and then request only the necessary relevant subset of scopes by explicitly setting the 'scope' parameter on /oauth2/authorize when prompting the user to authorize your app. So, when you only need to connect an individual account, Business or not, e.g., for file access, you would set only the necessary user scope(s) in 'scope'. When you need to connect an entire Business team, you would set the necessary team scope(s) in 'scope'.

     

    You can use the same API functionality for listing and access files and folders in both non-Business and Business account, but note that Business accounts in particular may use one of two different configurations: team folders or team spaces. To access the contents of a team space, you'll need to set the 'Dropbox-API-Path-Root' header. You can find information on that in the Team Files Guide.

2 Replies

  • Здравко's avatar
    Здравко
    Legendary | Level 20
    4 years ago

    Jistix wrote:

    ...  When users connect our app to Dropbox via OAuth, the process is successful, but the users are not able to see any of their files or folders within our app. ...


    Hi Jistix,

    To be able see your users files or folders, you need call to 2/files/list_folder[/continue]. As you can see there (AUTHENTICATION) particular context (i.e. user's files/folders to be listed) need to be denoted. On personal account it's a single context - the person's context. On team account there are many contexts, where you have to select from! Are you doing this in your application? 😉

    Hope this gives direction.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    4 years ago

    Jistix You do not need two distinct Dropbox apps. When using just "user" scopes, any kind of Dropbox account, Business or not, can be connected to your app. When using any "team" scopes though, only Dropbox Business teams can be connected to your app, and only Business teams admins can perform that authorization.

     

    You should only enabled the minimum set of scopes needed for your app. If you need both user and team scopes, you can use a single app with both enabled, and then request only the necessary relevant subset of scopes by explicitly setting the 'scope' parameter on /oauth2/authorize when prompting the user to authorize your app. So, when you only need to connect an individual account, Business or not, e.g., for file access, you would set only the necessary user scope(s) in 'scope'. When you need to connect an entire Business team, you would set the necessary team scope(s) in 'scope'.

     

    You can use the same API functionality for listing and access files and folders in both non-Business and Business account, but note that Business accounts in particular may use one of two different configurations: team folders or team spaces. To access the contents of a team space, you'll need to set the 'Dropbox-API-Path-Root' header. You can find information on that in the Team Files Guide.

About Dropbox API Support & Feedback

Node avatar for 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!