You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
tobiasger
4 years agoHelpful | Level 5
Response failed with a 400 code for filesListFolder
I'm trying to list the folder structure of my Dropbox account through the following code in Vue:
<script>
export default {
data() {
return {
accessToken:
"XXXX",
};...
tobiasger
Helpful | Level 5
Thank you! I receive the following error:
Error in call to API function "files/list_folder": This API function operates on a single Dropbox account, but the OAuth 2 access token you provided is for an entire Dropbox Business team. Since your API app key has team member file access permissions, you can operate on a team member's Dropbox by providing the "Dropbox-API-Select-User" HTTP header or "select_user" URL parameter to specify the exact user <https://www.dropbox.com/developers/documentation/http/teams>.
So if I understand it correctly I need to define what exact user that the filesListFolder should be used from? Is there an easy method for simply using the master account that is registered on the Dropbox Advanced plan for this?
What I ultimately want to be able to do in the end is to use filesUpload into a Team Folder, I just wanted to see if I could reach the folder in question first using the filesListFolder function.
Greg-DB
4 years agoDropbox Staff
This error message is referring to specifying what account on the Business team to operate on behalf of. For reference, when using any "team scopes", the resulting access token is connected to an entire Dropbox Business team, not an individual account. So, when using a team-scoped access token to access user-specific endpoints, such as via filesListFolder/filesListFolderContinue, you will need to specify which member of the team you want to operate on behalf of.
To do this, you'd need to specify the 'Dropbox-API-Select-User' header (or 'Dropbox-API-Select-Admin' as needed/desired). The value should be the team_member_id
for whichever member you wish to act on behalf of. In the JavaScript SDK, that's done via the selectUser or selectAdmin option, respectively, on the Dropbox constructor.
Alternatively, if you just want to connect to a particular account, you can disable any team scopes and get a new access token without them. The access token without the team scopes will be specific to the particular account (Business or not) and so will not require the additional header. You can find more information on scopes in the OAuth Guide. If you don't need to call any team endpoints (e.g., if you just need to call individual endpoints, such as filesListFolder/filesListFolderContinue), I recommend this solution instead for simplicity and security.
About Discuss Dropbox Developer & API
Make connections with other developers
795 PostsLatest Activity: 2 days 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!