Skip to main content
Box Employee
May 21, 2025 10:24 AM UTC
Question

Getting 404 trying to create group collaboration on a folder via Java SDK

Hello,

 

I'm using the Java SDK to create a collaboration on a folder for a group.  Both folder and group were created by the AppUser.  I get

 "The API returned an error code: 404"

trying to do this:

BoxCollaboration.Info collabInfo = collabFolder.collaborate(collaborator, BoxCollaboration.Role.EDITOR);  

where

BoxFolder collabFolder =  getBoxFolderByName(BoxFolder.getRootFolder(appUserCon), folderName);
BoxGroup collaborator = getBoxGroupByName(appEntCon, groupName);

Note that I'm using AppEnterpriseConnection to get BoxGroup and AppUserConnection to get BoxFolder, as that seems to be the only way I can get those objects. 

 

What am I doing wrong?  If anyone has succeeded in adding collaborations via API, can you share your experience?

 

Thanks,

Kumi

 

    1 reply

    Box Employee
    May 21, 2025 10:24 AM UTC

    If anyone's interested, this was due to the invitability_level set for the folder.  It had to be "all_managed_users" in order to invite group as a collaborator.

     

    Kumi

    Translate