We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
test0071
8 years agoExplorer | Level 4
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
- Vicker8 years ago
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-DB8 years ago
Dropbox Community Moderator
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
Find help with the Dropbox API from other developers.
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, Facebook or Instagram.
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!