You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
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
Sdrastwuj Sdrawko,
I used to learn Russian at school, just about 50 years ago, but almost forgot everything 🙂 At least I'm still able to "decipher" cyrillic letters.
Thank you for your response. I already answered yesterday but somehow this post has vanished.
Ok, let me pls start over:
The DBX app I created has all rights on the Dropbox, I'll revoke some of them after finishing development.
My biggest problem actually is that the following dialog pops up everytime I make a call using the "Dropbox-API-Select-Admin" header parameter.
(Translation: Please enter your user name and password)
This obviously is where I've to authorize myself as DBX/Team Admin. Unfortunately I wasn't able to find anything in the documentation that this particular authorization is needed at all, since I do provide a valid app "Bearer" token. So my question is: Is this the normal behavior?
This applies to all endpoints where I try to tamper with one of the team folders (like adding members).
IMHO this happens:
Authorization as a user is always done using "Basic" authorization method with "username:password" as Base64 string.
So, this might be the problem. But again, why above popup appears? IMHO this is wrong!
Any suggestions? Thank you & Doswidania 🙂
Jan
- Здравко3 years agoLegendary | Level 20
1575475 wrote:Sdrastwuj Sdrawko,
I used to learn Russian at school, just about 50 years ago, but almost forgot everything 🙂 At least I'm still able to "decipher" cyrillic letters.
...
😁 Здравей Йан,
I have no idea where you decide from that I'm Russian. If the only reason are Cyrillic letters, what alphabet is in use in US for instance? Is it American or English alphabet? The same in Australia, some parts of Canada, etc. By the way, Cyrillic is so much Russian as English alphabet is US (i.e. it's just used there 😉). Go to the nearest big library (if you like "offline" confirmation) and ask staff there to direct you to historical documents about Cyrillic or just search online. 🙂 Did you find out where Cyrillic originates from? In addition, why € banknotes include Cyrillic name? Is this in favor of Russian? 😁 Maybe not.
On the actual question, You didn't still provided how actually you make calls to API end points. Seems like the software, you are using, gets confuse somehow and it does definitely not include official supported Dropbox SDK. Whatever is this software, it brings up the message you posted above - there is no way API itself to do the same. Read more carefully your tools documentation, how such calls can be performed in particular context. Most probably you have skipped something required by the platform you are working on.
1575475 wrote:...
This obviously is where I've to authorize myself as DBX/Team Admin. Unfortunately I wasn't able to find anything in the documentation that this particular authorization is needed at all, since I do provide a valid app "Bearer" token. So my question is: Is this the normal behavior?
...
This is definitely not a normal behavior. You are looking on wrong documentation! As I mentioned before, take a look on you tools documentation.
1575475 wrote:...
Authorization as a user is always done using "Basic" authorization method with "username:password" as Base64 string.
So, this might be the problem. But again, why above popup appears? IMHO this is wrong!
...
This is definitely problem! Seems your environment changes it. Read your environment documentation (or ask supplier for support) why that happens.
About the "rights":
1575475 wrote:...
The DBX app I created has all rights on the Dropbox, I'll revoke some of them after finishing development.
...
Did you confirmed your scopes (rights) on authorization? Alternatively you can skip this part which means "accept everything". If you pointed something and particular scope is not there, this means the same scope becomes inactive.
Надявам се, че горното дава насоки. 😉
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!