We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
1575475
3 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...
- 3 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.
Здравко
Legendary | Level 20
1575475 wrote:... I get a strange error:
Error in call to API function "sharing/add_folder_member": Invalid authorization value in HTTP header "Authorization": "Basic <some base64 string>"
Expecting "Bearer <oauth2-access-token>"I do provide an bearer oauth2 access token for app authentication (app ) and my user id (as admin) for the "Dropbox-API-Select-Admin" header parameter.
...
Hi 1575475,
As seems, you thought "Bearer" authentication got provided, but you have "Basic" authentication provided actually (something incompatible). Review your algorithm. There is a mistake (most probably typing inaccuracy).
1575475 wrote:...
curl -X POST https://api.dropboxapi.com/2/sharing/add_folder_member \
--header 'Authorization: Bearer <created access token using refresh token>' \
--header 'Dropbox-API-Select-Admin: dbid:<my team member id>' \
--header 'Content-Type: application/json' \
--data '{"shared_folder_id":"<team folder id>","members":[{"member":{".tag":"dropbox_id","dropbox_id":"dbid:<my user id>"},"access_level":{".tag":"editor"}}],"quiet":false,"custom_message":"Test"}'
and got "missing scope ..." and "required scope sharing/write"
This means, either you miss "sharing/write" for your application or you have limited scopes on application authorization or on access token receiving. Make sure you have "sharing/write" everywhere (miss even on one place and the scope gets inactive) or remove limiting of scopes on authorization and on token receiving (if applicable) - in such a case token scopes set will match exactly on what's selected, for the application, in application console. Take in mind too that a change in scopes is NOT retroactive - you have to re-authenticate so the change can take effect.
Good luck.
1575475
3 years agoExplorer | Level 3
Hi Здравко,
thank you for your response.
The app I use has all rights possible (just for development, will revoke unneeded ones later on).
But I still don't get the point why I'm getting a popup to authorize to DBX.
I do have provided a new Bearer Token to authenticate my app, so why do I have to authenticate myself as Admin, too? Is this normal?
REST calls should be performed pretty much in the background without user interaction.
Since the authentication as Admin (user) is always of type "Basic" (username:password encoded in Base64) the DBX API might get this wrong.
Any futher suggestions? Thank you in advance.
I'd rather post my code here, but doubt anybody can interpret ABAP (SAP programming language) 🙂
Best,
Jan
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 12 months 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!