Welcome to the new Box Support website. Check out all the details here on what’s changed.

BoxFolder.collaborate failed with 404 error

Answered
New post

Comments

2 comments

  • Quande Ren

    Just want to clarify, I am using email  as userId here.

        public static final String EMAIL  = "xxx@gmail.com";
        ...
        BoxCollaborator user = new BoxUser(api, EMAIL);

    I guess this may be the reason that it failed. If so, how should I create collaboration using email?

    0
    Comment actions Permalink
  • Quande Ren

    I figured out the problem and solution.

    I used following code and the collaboration is successfully created:

     

    BoxFolder folder = new BoxFolder(api, folderId);
    BoxCollaboration.Info collaborate = folder.collaborate(email, BoxCollaboration.Role.VIEWER );

     

     

    0
    Comment actions Permalink

Please sign in to leave a comment.