Method nameThe Archbee page is titled Share With Community User, but the underlying Apex method is shareResources(). Call it as cldfs.Client.shareResources(...).

Signature

global static List<Attachment> shareResources(
  List<Types.ShareResourceInput> shareResourceInputs,
  String library,
  String runAs
)
Parameters
ParameterDescription
shareResourceInputs requiredList of Types.ShareResourceInput entries, one per resource to share.
library
String
requiredType of library (example - sharepoint). You can get this value from the Content Library.
runAs
String
optionalrunAs — usually a static value, integrationUser.

Return Type

Example

List<cldfs.Types.ShareResourceInput> shareResourceInputs = new List<cldfs.Types.ShareResourceInput> {
    new cldfs.Types.ShareResourceInput(
        '01KEHAKUXVID7NMSLZINGKUXGQ3SIT75CM',
        'file',
        '001dL00000Wonj3QAB',
        'b!nJBtPq_z5UeJtFrj_f24XEQqlPUD8vtFsg7GBcrXJepiUn9bkb_7QbDPtqHVD-cP'
    )
};
List<cldfs.Attachment> attachments = cldfs.Client.shareResources(
    shareResourceInputs,
    'sharepoint',
    'integrationUser'
);