Enable desktop sync for folders via Box.com API
سؤال
Is it possible to programmatically enable Desktop Sync for a folder via the Box.com API?
My Box application creates a folder at the root level upon installation. I'd like to this folder to be available via Desktop Sync for users who are using desktop clients.
المحلول
This can be accomplished by updating the sync_state
parameter on a folder, as documented here.
For example, to do this in cURL for folder with ID 123:
curl https://api.box.com/2.0/folders/123 \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d '{"sync_state": "synced"}' \
-x PUT
لا تنتمي إلى StackOverflow