Well, i do not see any code you provide about how much efforts you put on, to achieve your aim.
However, if you are working with Wix-Groups and you want to know if a USER is a MEMBER of a specific group, what you should know first?
1) Which groups are available in total? → Groups-Listing…
import { Permissions, webMethod } from 'wix-web-module';
import { groups } from 'wix-groups-backend';
export const myListGroupsFunction = webMethod(Permissions.Anyone, () => {
return groups.listGroups()
.then((groupResults) => {
const groupResultsMemberCount = groupResults.groups[0].memberCount;
const groupResultsName = groupResults.groups[0].name;
return groupResults;
})
.catch((error) => {
console.error(error);
});
});
The results could look like…
/* Promise resolves to:
* groups: [
* {
* "_id": "83636377-b415-4ebe-ba41-df338c5ad6b7"
* "name": "My Group 1"
* "slug": "my-group-1"
* "description": "Welcome to the group! You can connect with other members, get updates and share videos."
* "privacyStatus": "PUBLIC"
* "coverImage": {
* "imageUrl": "wix:image://v1/vcc6074e348009011fa9f2d29kk7~mv2.jpg/maple.jpg#originWidth=999&originHeight=240",
* "position": {
* "x": 44,
* "y": 90
* }
* }
* "memberCount": 83
* "settings": {
* "groupUpdatePostEnabled": true
* "membersCanApprove": false
* "membersCanInvite": true
* "showMemberList": true
* "welcomeMemberPostEnabled": true
* }
* "lastActivityDate": "Sun Sep 26 2021 08:23:23 GMT+0300"
* "_createdDate": "Tues January 22 2021 12:56:02 GMT+0300"
* "_updatedDate": "Fri October 2 2021 04:56:22 GMT+0300"
* "owner": "9ne8e9e1-d050-4c86-9684-e7f231600a34"
* },
* {
* "_id": "6ff5333-b477-4e9tt-ba4j-df338c5ad6221"
* "name": "My Group 2"
* "slug": "my-group-2"
* "description": "Welcome to the group! You can connect with other members, get updates and share videos."
* "privacyStatus": "PRIVATE"
* "coverImage": {
* "imageUrl": "wix:image://v1/dn33kcc6074e348009011fa9f2d29k03~mv2.jpg/fire.jpg#originWidth=287&originHeight=100",
* "position": {
* "x": 55,
* "y": 166
* }
* }
* "memberTitle": "Friends"
* "memberCount": 68
* "settings": {
* "groupUpdatePostEnabled": true
* "membersCanApprove": true
* "membersCanInvite": true
* "showMemberList": false
* "welcomeMemberPostEnabled": true
* }
* "lastActivityDate": "Thurs Nov 12 2020 11:13:03 GMT+0300"
* "_createdDate": "Wed May 14 2020 10:05:20 GMT+0300"
* "_updatedDate": "Sun June 7 2020 09:07:33 GMT+0300"
* "owner": "abe5e4e1-d950-4c46-8884-e7f231600d67"
* }
* ],
* metadata:
* {
* "length": 2
* "tooManyToCount": false
* "totalCount": 2
* }
*/
2) You could expand the functionality of this shown code to filter out DATA of a specific group --> in your case ---> **GROUP-123**
This could be done by simply adding some if-else-conditions.
- You also could get a specific group by ID…
import { Permissions, webMethod } from 'wix-web-module';
import { groups } from 'wix-groups-backend';
// Sample groupId value:
// 'fc3df3c1-36b2-4279-8be1-8e72a05a88c8'
//
// Sample options value:
// {
// suppressAuth: true
// }
export const myGetGroupFunction = webMethod(Permissions.Anyone, async (groupId, options) => {
try {
const getGroupResults = await groups.getGroup(groupId, options);
const getGroupResultsName = getGroupResults.name;
const getGroupResultsDescription = getGroupResults.description;
return getGroupResults;
} catch (error) {
console.error(error);
}
});
Getting all the data of the specific group, but this for again you first have to know the ID → result → first have to list all groups.
- Once you have found the right group → you can list all of its Group-Members…
listGroupMembers - Velo API Reference - Wix.com
So as you can see, you did not provide anything about all these processes and itermediate steps, needed to get what you want.