Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Anusha
9 years agoExplorer | Level 3
Trying to add group to the Team Folder using API
Hi, I am trying to create a team folder and adding groups to it using API, Creating a team folder works fine, Then for adding groups to the folder, I could not find any API to do that. Can you pleas...
jason_nyc
7 years agoExplorer | Level 3
Host: https://api.dropboxapi.com
User-Agent: api-explorer-client
Authorization: Bearer K3eIF3qUz8xxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: application/json
{
"shared_folder_id": "4968278384",
"members": [
{
"member": {
".tag": "dropbox_id",
"dropbox_id": "g:22f456bfb225a64b000000000009f325"
}
}
]
}tried this from the api explorer and get this
{
"error_summary": "access_error/not_a_member/...",
"error": {
".tag": "access_error",
"access_error": {
".tag": "not_a_member"
}
},
"user_message": {
"locale": "en",
"text": "You aren’t a member of this shared folder."
}
}I'm trying to do this as a Team admin
When I do this in powershell i get
$Token = 'K3eIF3qUz8AAxxxxxxxxxxxxxxx'
$uri='https://api.dropboxapi.com/2/sharing/add_folder_member'
$body_req='{"shared_folder_id": "4968278384", "members": [ { "member": {".tag": "dropbox_id", "dropbox_id": "g:22f456bfb225a64b000000000009f325" }}]}'
$res = Invoke-RestMethod -Uri $uri -Body $body_req -ContentType 'application/json' -Headers @{ Authorization = ("Bearer " + $Token) } -Method Post
Invoke-RestMethod : The remote server returned an error: (409) Conflict.
At line:1 char:8Greg-DB
Dropbox Community Moderator
7 years agojason_nyc Thanks for the code/output! I see you're trying to operate on a team folder using a user-linked "Dropbox API" app. To perform this operation, you'd need to use a "Dropbox Business API" with the 'team member file access' permission, using the "Dropbox-API-Select-Admin" header, like in my the example in my previous post.
By the way, the two attempt you shared here are probably the same error. In the PowerShell attempt you don't seem to be printing the response body, but I expect it would contain the same error.
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!