Cut the Clutter: Test Ignore Files Feature - sign up to become a beta tester here.

Forum Discussion

test0071's avatar
test0071
Explorer | Level 4
8 years ago

set sharing policy as disabled

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

  • 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's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    8 years ago

    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."

     

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,038 PostsLatest Activity: 3 years ago
415 Following

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 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!