We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
sffatcat
2 years agoNew member | Level 2
access token for a Team folder
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.
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.
- ЗдравкоLegendary | Level 20
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-DBDropbox Staff
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.
- sffatcatNew member | Level 2
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-DBDropbox Staff
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.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 12 months agoIf 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!