cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know more about how you can find anything and protect everything? Check it out 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: 

access token for a Team folder

access token for a Team folder

sffatcat
New member | Level 2
Go to solution

is it possible to generate a access token for a Team folder?

then use the token in script to send file to the Team folder?

 

I know we can do a app on user's own personal folder with a token.

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

@sffatcat Yes, as long as the app is authorized with the necessary permissions (i.e., full Dropbox access, with the necessary scopes, which would be files.metadata.read for listing files, and files.content.read for downloading files), the app could access anything that the account has access to, including team folders.

View solution in original post

4 Replies 4

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

@sffatcat wrote:

is it possible to generate a access token for a Team folder?

...


Hi @sffatcat,

Take in mind that tokens are associated to corresponding accounts, not to specific folders (including team folders). Once you have OAuth flow done, you can use resulted token to access all folders accessible for particular team member.

 


@sffatcat wrote:

...

then use the token in script to send file to the Team folder?

...


Content handling (upload/download) require a team member to be impersonated. While in personal account there is only one user and nothing needs to be clarified, team account has least 3 members/users. To be clear who your script acting behind, you need to specify the user using Dropbox-API-Select-User header or equivalent method when you use some SDK (take a look in corresponding documentation).

 


@sffatcat wrote:

...

I know we can do a app on user's own personal folder with a token.


Take in mind in personal account user home namespace matches account root, but these are different when you are part of a team. By default, on team account, the member home folder is handled as call root. So if nothing else specified everything outside the home lefts inaccessible! To be able access files/folders outside your home folder, you need to set explicit namespace to be used as root using Dropbox-API-Path-Root header or equivalent method when you use some SDK.

Hope this helps.

Greg-DB
Dropbox Staff
Go to solution

@sffatcat As Здравко indicated, access tokens are connected to a specific account/team, not specific existing team folders. Dropbox does not offer the ability to grant an app/access token access to specific existing folder(s) only, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.

 

And as they mentioned, you can use the API to access whatever the connected account has access to, but in order to access the team space, if applicable, you would need to set the Dropbox-API-Path-Root header. You can find information on that in the Team Files Guide.

sffatcat
New member | Level 2
Go to solution

so, if as a user, doing a app, generate a token, and user also has permission to a Team folder.

does this token also works for accessing the Team folder?

Greg-DB
Dropbox Staff
Go to solution

@sffatcat Yes, as long as the app is authorized with the necessary permissions (i.e., full Dropbox access, with the necessary scopes, which would be files.metadata.read for listing files, and files.content.read for downloading files), the app could access anything that the account has access to, including team folders.

Need more support?
Who's talking

Top contributors to this post

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