Restrict Shared Link Access for Folder Programmatically?

新規投稿

コメント

2件のコメント

  • carycheng77

    Hey ,

     

    The screenshot you took is off folder level settings. Folder level settings is not exposed via API so the field you are trying to set is read-only.

     

    Alternatively, you can set the shared links to collaborators only by altering the shared link itself. This will not trickle across the shared links in the folder. You will have to loop through the files and folders and retrieve the shared link and update the permission from there.

     

    The call to update a shared link is as follows:

     

    folder = client.folder('50167809963').get().get_shared_link(access='collaborators')    

     

    Let us know if you run into any issues, thanks!

    0
    コメントアクション パーマリンク
  • RobCarleski

    Thanks for the reply! Unfortunately, what I'm hoping to accomplish here is to restrict any shared links made moving forward with the account to collaborators-only, so rolling through existing links and changing them doesn't help with this particular scenario. Looking in my own account settings, I see that there's a way to restrict shared link access at the user account level, though I'm not seeing a corresponding attribute for a user via the API. Am I missing something? Thanks again!

    0
    コメントアクション パーマリンク

サインインしてコメントを残してください。