Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
1575475
4 years agoExplorer | Level 3
Error when adding team members to an initally created team folder via http endpoint
I'm making REST calls to the DBX HTTP endpoint from within SAP. My app has full dbx access and all possible rights. Creating a team folder works flawlessly but when trying to add members to that fol...
- 4 years ago
1575475 Apologies for the lack of clarity here. For team folders in particular, you need to add members via groups; you can't add them individually. I'll ask the team to see if we can clarify this in the documentation and error response.
For example, you would set the "members" parameter like:
"members":[{"member":{".tag":"dropbox_id","dropbox_id":"GROUPIDHERE"}}]You can get group IDs from /2/team/groups/list, etc.
Greg-DB
Dropbox Community Moderator
4 years ago1575475 As Здравко said, it would be helpful to see the actual request to troubleshoot this further. From your description though, are you trying to call /2/sharing/share_folder on the team folder itself, which you created using /2/team/team_folder/create? You don't need to "share" a team folder, since it is already "shared". (Team folders are essentially a type of shared folder.) You can use /2/sharing/add_folder_member to add members to it.
1575475
4 years agoExplorer | Level 3
Hi Greg, hi Sdrawko,
thank you again for your input. In the meantime I've created a Postman script which also fails. Here're the details:
URL: https://api.dropboxapi.com/2/sharing/add_folder_member
Header parameters
The app token has been fetched a couple of minutes before and I've double checked my team member id. Since this id is used in various other calls it has to be ok.
JSON Body
{"custom_message":"Test","members":[{"access_level":"editor","member":{".tag":"email","email":"jan.buchholz@karon.de"}}],"quiet":true,"shared_folder_id":"3032413665"}
(Output of list team folders, just to check that the folder id is correct)
What I don't understand here is that the "team shared" flag is set to false. In ABAP space=false and "X"=true.
Response with status 409 (conflict)
{
"error_summary": "no_permission/..",
"error": {
".tag": "no_permission"
},
"user_message": {
"locale": "de",
"text": "Sie sind nicht berechtigt, diese Aktion durchzuführen."
}
}
App permission
After rectifying the ominous popup issue, I think that the API I've created is in a "mature state" and doesn't contain any more errors.
Any other calls (list folder, create folder, upload file, download file, delete file, get_metadata, list team members, list team namespaces, list team events, etc.) work flawlessly.
Now, as even the Postman script fails, IMHO the problem must be somewhere else. But, I'm running out of clues 😞
BTW, since I'm already member of the team folder, I'd expect some kind of error message, but not permission related at all.
Best regards,
Jan
- Здравко4 years agoLegendary | Level 20
1575475 wrote:...(Output of list team folders, just to check that the folder id is correct)What I don't understand here is that the "team shared" flag is set to false. In ABAP space=false and "X"=true....
There is not exactly "IS_TEAM_SHARED", so most probably your are referring to "is_team_shared_dropbox" (which means is this a team root or not 😉). In all cases it's a team folder.
There are different reasons (wide spread of such) that can lead to wrong result. Let's do one more step to clarifying. Execute something like following:
curl -X POST https://api.dropboxapi.com/2/sharing/get_folder_metadata \ --header 'Authorization: Bearer sl.BQAwolS9uZkZOnfZtpVoQIbNSX...' \
--header 'Dropbox-Api-Select-Admin: dbmid:AACAstOvwj3lJYBziCcpdksycjMM-...' \ --header 'Content-Type: application/json' \ --data '{"shared_folder_id":"3032413665","actions":[{".tag":"invite_editor"},{".tag":"invite_viewer"}]}'...or represent the same request as you like (is easier to you). Can you post the result? 🧐 There can be some clue.
- 15754754 years agoExplorer | Level 3
Hi Sdrawko,
thank you for your help.
Regarding the "IS_TEAM_SHARED" field: What you see is the SAP internal field, it is mapped correctly to the original metadata field.
I internally used some shorter name to spare horizontal space 🙂
I ran your script with Postman and got the following result:
{"access_type": {".tag": "owner"},"is_inside_team_folder": false,"is_team_folder": true,"owner_team": {"id": "dbtid:AABm0erI_vc6S9THU9dZ32uHg68XlhP1TNM","name": "Karon Beratungsgesellschaft mbH IUL"},"name": "KARON_TEAM_ON_PRD_TEST_001","permissions": [{"action": {".tag": "invite_editor"},"allow": true},{"action": {".tag": "invite_viewer"},"allow": true}],"policy": {"member_policy": {".tag": "anyone"},"resolved_member_policy": {".tag": "anyone"},"acl_update_policy": {".tag": "editors"},"shared_link_policy": {".tag": "anyone"},"viewer_info_policy": {".tag": "enabled"}},"shared_folder_id": "3032413665","time_invited": "2022-09-20T10:57:59Z","access_inheritance": {".tag": "inherit"}}Best regards,Jan- Здравко4 years agoLegendary | Level 20
Wow... that's going be something really strange. According to your last post you should be able add (invite) a member. 🤔🤷 I can't say something more.
You can try repeat execution of the failing request and catch the response header block. There should be a header 'x-dropbox-request-id'. Post this header's value and let's hope Greg will be able find out something more.
Good luck.
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!