"Get the Group members" sample code throwing error:

Hi Team,

I am using the following link to get group member information:

I am trying to get group member detail using below code:

var GUID = “GUID”;
var limit = 30;
var groupMemberRequest = new CometChat.GroupMembersRequestBuilder(GUID).setLimit(limit).buid();

groupMembers => {
console.log(“Group Member list fetched successfully:”, groupMembers);
error => {
console.log(“Group Member list fetching failed with exception:”, error);

Its throwing error,
TypeError: new _reactNativeChat.CometChat.GroupMembersRequestBuilder(guid).setLimit(30).buid is not a function. (In ‘new _reactNativeChat.CometChat.GroupMembersRequestBuilder(guid).setLimit(30).buid()’, ‘new _reactNativeChat.CometChat.GroupMembersRequestBuilder(guid).setLimit(30).buid’ is undefined)

I need to exclude group member when adding new member to that group, please let me know how to achieve this.
SDK version is : 2.0.7


Hello @shaheen,

It looks like you are using SDK 2.0.7 but referring to documentation of v1.8. Please refer to the following documentation link for the v2 SDK. Also, there is a typo in your syntax. It should be .build() and not .buid()

Documentation for v2 SDK: https://prodocs.cometchat.com/docs/react-native-groups

Warm Regards,

CometChat Pro
Mayur Bhandari

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.