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

invite Collaborators from Salesforce API

Answered
New post

Comments

1 comment

  • cary

    Hey ,

     

    If you are receiving a 401 unauthorized as the API response I would check your token to make sure it has not expired. One more thing I would like to add is although creating the HTTP request manually is totally fine I would use our Box Salesforce SDK found here

     

    You can find the call to add a collaborator here

     

    By ID:

    BoxCollaborator user = new BoxUser(api, 'user-id')
    BoxFolder folder = new BoxFile(api, 'folder-id');
    folder.collaborate(user, BoxCollaboration.Role.EDITOR);

    By Email:

    BoxFolder folder = new BoxFile(api, "id");
    folder.collaborate("gcurtis@box.com", BoxCollaboration.Role.EDITOR); 

     

    0
    Comment actions Permalink

Please sign in to leave a comment.