Level up your Box knowledge with brand new learning paths on Box University. Visit training.box.com to get started

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.