cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

set sharing policy as disabled

set sharing policy as disabled

test0071
Explorer | Level 4

Hi,

 

I am using following API  docs/sharing_policy/set to set public sharing policy via api explorer all of the public shairn policies work fine except

disabled

curl -X POST https://api.dropboxapi.com/2/paper/docs/sharing_policy/set \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{"doc_id":"WqfDh6TLUqMMbzCYDVLJe","sharing_policy":{"public_sharing_policy":{".tag":"disabled"}}}'

for which i get follwoing response

Error: 400

Error in call to API function "paper/docs/sharing_policy/set": Invalid arguments supplied.

Can you pelase check this and let me know why it doesnot work

2 Replies 2

Vicker
Super User

Hi @test0071,

 

You may try the following.

 

curl -X POST https://api.dropboxapi.com/2/paper/docs/sharing_policy/set \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{"doc_id":"WqfDh6TLUqMMbzCYDVLJe","sharing_policy":{"public_sharing_policy":"disabled"}}'

Cheers

Vicker

Greg-DB
Dropbox Staff

@test0071 Note that, from the documentation:

 

"'public_sharing_policy' cannot be set to the value 'disabled' because this setting can be changed only via the team admin console."

 

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Vicker Super User
What do Dropbox user levels mean?