We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
christopher-fam
6 years agoExplorer | Level 3
Creating Team Folder via Python SDK
I'm trying to create team folders on a business account through the python SDK.
when I run the following code:
dbx = dropbox.DropboxTeam(access_token).as_admin(team_member_id)
dbx.files_create_folder_v2('/test_folder')
I get an error stating:
CreateFolderError('path', WriteError('no_write_permission', None)))
I have given my app all the write permissions it needs.
1 Reply
- Greg-DB6 years ago
Dropbox Community Moderator
The /2/files/create_folder_v2 endpoint that the files_create_folder_v2 method uses only supports the Dropbox-API-Select-Admin
"Team Admin" mode, meaning:The endpoint can access content of team folders but not team member's private files.
Since you're using "as_admin", that's setting the "Dropbox-API-Select-Admin" header, but by default API calls operate in the member's own private folder.
So, if you did intend to create the folder inside the member's own private folder, you should use "as_user", instead of "as_admin".
Alternatively, if you meant to create the folder in the "team space", you should also use "with_path_root" to root the call in the team space. Please refer to the Team Files Guide for information on using that if so.
About 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!