BoxSharedLink with password

回答済み
新規投稿

コメント

3件のコメント

  • Howard

    Hi ,

     

    Welcome to the Box Community and thanks for your first post in the forum!

     

    Thanks for the detailed question! Have you checked out the developer documentation here for reference?

     

    I see some example code here:

     

    {
      "url": "https://www.box.com/s/vspke7y05sb214wjokpk",
      "download_url": null,
      "vanity_url": null,
      "is_password_enabled": false,
      "unshared_at": null,
      "download_count": 0,
      "preview_count": 0,
      "access": "open",
      "permissions": {
        "can_download": true,
        "can_preview": true
      }
    }

    Be sure to read our guidelines, Subscribe to content you like, and complete your profile on the community.

     

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

    Hi  — I'm Matt, the technical lead for our SDKs.  The Java SDK includes an overload of the createSharedLink method that lets you set a password as of v2.21.0 — please upgrade your version of the SDK to take advantage of this functionality.  You should be able to do the following:

     

    String folderId = boxFolderId;
    BoxFolder file = new BoxFolder(apiConnection, folderId);
    BoxSharedLink.Permissions permissions = new BoxSharedLink.Permissions();
    permissions.setCanDownload(true);
    permissions.setCanPreview(true);
    String password = "PASSWORD GOES HERE";
    BoxSharedLink sharedLink = file.createSharedLink(BoxSharedLink.Access.OPEN,null, permissions, password);
    0
    コメントアクション パーマリンク
  • oussama1

    Thanks for yout help Mwiller, it works, 

     

    I have an other question, how can i share multiple files and folders ?

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

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