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.
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.
- 15754754 years agoExplorer | Level 3
Hi Sdrawko,
just added some lines of code to my method to fetch the response header fields.
Here're the values straight out of the debugger 🙂
~response_line HTTP/1.0 409 Conflict
~server_protocol HTTP/1.0
~status_code 409
~status_reason Conflict
cache-control no-cache
content-security-policy sandbox allow-forms allow-scripts
x-content-type-options nosniff
content-type application/json
accept-encoding identity,gzip
date Tue, 27 Sep 2022 13:46:25 GMT
server envoy
content-encoding gzip
vary Accept-Encoding
x-dropbox-response-origin far_remote
x-dropbox-request-id 0b7745ec6a394c35861332368f0f641d
connection closeBest regards,
Jan
- Greg-DB4 years ago
Dropbox Community Moderator
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.
- 15754754 years agoExplorer | Level 3
Hi Greg, hi Sdrawko,
many, many kudos to the both of you for your most valuable help!
I now know how to proceed ...
Best regards,
Jan
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!