cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you an educator? Well we want to hear from you, so check out some tools we think might help you out here!

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Share_folder: unable to set folder settings

Share_folder: unable to set folder settings

Heather_P
Explorer | Level 4

When a user presses a button in the internal software used by my company, I'd like to create a folder with a set of subfolders in Dropbox. I can create the folder and subfolders using the API, but I haven't been able to change the folder settings on the folders (some of the subfolders need to have different settings to the top level folder).

 

I use create_folder_v2 to create the folder and subfolders (this works successfully).

 

Then I use share_folder to try to change the folder settings:

curl -X POST https://api.dropboxapi.com/2/sharing/share_folder 

--header "Authorization: Bearer <access token>"
--header "Content-Type: application/json"

--data "{\"path\":\"/API Test folder\/test\",\"shared_link_policy\":\"members\"}"

 

Share_folder returns the following error:

{

  "error_summary":"no_permission\/...",

  "error":{

    ".tag":"no_permission"

  },

  "user_message":{

    "locale":"en_GB",

    "text":"You don’t have permission to perform this action."

  }

}

 

This error happens even if the user is an admin user with write permissions to the folder which the top level folder is added to.

 

I would like to change these folder settings:

Screen Shot 2019-02-06 at 10.59.43.png

If I call share_folder without trying to change the folder settings, share_folder works successfully (but clearly the settings aren't changed).

curl -X POST https://api.dropboxapi.com/2/sharing/share_folder 

--header "Authorization: Bearer <access token>"
--header "Content-Type: application/json"

--data "{\"path\":\"/API Test folder\/test\"}"

 

What am I doing wrong? How can I fix this?

2 Replies 2

Re: Share_folder: unable to set folder settings

Greg-DB
Dropboxer

It sounds like "/API Test folder" is a team folder, and "/API Test folder/test" is a shared folder nested in that team folder.

Since "/API Test folder/test" is nested in that team folder, it is owned and managed by the team, so you can't change the settings for the nested shared folder directly as a user via a Dropbox API app. (A team admin could change these via the Admin console or via a Dropbox Business API app using the "Dropbox-API-Select-Admin" header though.)

If you try the same call with a shared folder that isn't in a team folder, it should work.

Re: Share_folder: unable to set folder settings

Heather_P
Explorer | Level 4

Yes "/API Test folder" is a team folder.

 

Thanks for your help - I'll try what you've suggested.

Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    Heather_P Explorer | Level 4
  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?