Skip to main content
Version: 5.7.0

AddGroupMember

Add a member to the group. Optional parameters: jsonAttributes.

ServiceOperation
groupADD_MEMBER_TO_GROUP

Method Parameters

ParameterDescription
groupIdID of the group
profileIdProfile ID of the member being added
roleRole of the member being added
jsonAttributesAttributes of the member being added

Usage

http://localhost:3000
string groupId = <%= data.example.groupId %>;
string profileId = <%= data.example.profileId %>;
BrainCloudGroup.Role role = BrainCloudGroup.Role.MEMBER;
string jsonAttributes = <%= data.example.jsonAttributes %>;

SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("[AddGroupMember Success] {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};

_bc.GroupService.AddGroupMember(
groupId,
profileId,
role,
jsonAttributes,
successCallback,
failureCallback);
JSON Response
{
"status": 200,
"data": null
}