cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

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

Jistix
Explorer | Level 3
Go to solution

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?

Screen Shot 2022-06-13 at 4.00.48 PM.png

@Greg-DB 

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

@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.

View solution in original post

2 Replies 2

Здравко
Legendary | Level 20
Go to solution

@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
Dropbox Staff
Go to solution

@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.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Здравко Legendary | Level 20
What do Dropbox user levels mean?