> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # ListGroupRequests # Package: groups # Namespace: GroupRequestsService # Method link: https://dev.wix.com/docs/api-reference/crm/community/groups/create-group-requests/list-group-requests.md ## Introduction Lists group requests across a site. --- ## REST API ### Schema ``` Method: listGroupRequests Description: Lists group requests across a site. URL: https://www.wixapis.com/v2/group-requests Method: GET Method parameters: query param name: limit | type: limit | description: Number of items to load. Maximum `100`. query param name: offset | type: offset | description: Number of items to skip in the current sort order. Return type: ListGroupRequestsResponse - name: groupRequests | type: array | description: Group Requests. - name: id | type: string | description: Group request GUID. - name: group | type: Group | description: Group requested for creation. - name: id | type: string | description: Group GUID. - name: slug | type: string | description: A unique part of a group's URL, for example `https:/example.com/groups/slug`. - name: privacyStatus | type: PrivacyStatus | description: Group privacy status. - enum: - UNKNOWN: Undefined group privacy status. - PUBLIC: Anyone can see the group and its content. Anyone can join the group. - PRIVATE: Anyone can see the group, but only members can see its content. New members must submit a `Join Group Request`. - SECRET: Only admins and members can see the group. New members can only be added by other members. - name: name | type: string | description: Group name. - name: description | type: string | description: Group description in [DraftJS](https://draftjs.org) format. - name: teaser | type: string | description: Group teaser. - name: memberTitle | type: string | description: What group members are called, for example `Coworkers`, `Friends`, or `Students`. - name: coverImage | type: CoverImage | description: Cover image. You cannot upload your own cover image. - name: image | type: Image | description: Cover image. - name: mediaId | type: string | description: Image GUID (for internal use). - name: width | type: integer | description: Image width. - name: height | type: integer | description: Image height. - name: preset | type: boolean | description: Indicates pre-configured/auto-generated images (from templates, client generated). - name: position | type: Position | description: Position of the corner of the cover image (or logo). - name: x | type: float | description: horizontal coordinate - name: y | type: float | description: vertical coordinate - name: mobilePosition | type: Position | description: Position of the corner of the cover image (or logo) for mobile browser. - name: altText | type: string | description: Alternative text is typically a relatively short phrase that describes what the image depicts. The alternative text is used: + If the browser cannot display the image. + If the user is utilizing a screen reader. + By search engines to understand what images are on your site. - name: settings | type: GroupSettings | description: Group specific settings. These settings can also be found in [a site's Dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fwix-groups/settings?). - name: welcomeMemberPostEnabled | type: boolean | description: Whether a daily post about new members is enabled. - name: groupDetailsChangedPostEnabled | type: boolean | description: Whether an automatic post about changing the group details is enabled. - name: showMemberList | type: boolean | description: Whether all members can see the full member list. - name: allowedToInviteMembers | type: AllowPolicy | description: Determines who can invite members to the group - enum: UNKNOWN, OWNER_AND_ADMINS, OWNER, ALL_MEMBERS - name: allowedToApproveJoinRequests | type: AllowPolicy | description: Determines who can approve member join requests to the group - name: aiSpamProtectionEnabled | type: boolean | description: Whether AI spam protection is enabled for post creation in the group. If not explicitly set, the default behavior is 'true' (enabled). - name: membersCount | type: integer | description: Total count of current group members. - name: ownerId | type: string | description: Group owner. - name: createdDate | type: string | description: Group creation date and time. - name: updatedDate | type: string | description: Date and time of the latest group update. - name: lastActivityDate | type: string | description: Date and time of the most recent group activity, for example a post or comment. - name: status | type: RequestStatus | description: Status of group request. - enum: - PENDING: Pending group request. - APPROVED: Approved group request. - REJECTED: Rejected group request. - CANCELED: Canceled group request. - name: requestDetails | type: RequestDetails | description: Group request details. - name: rejectionReason | type: string | description: Reason the request has been rejected. - name: metadata | type: PagingMetadata | description: Paging information. - name: count | type: integer | description: Number of items returned in the response. - name: offset | type: integer | description: Offset that was requested. - name: total | type: integer | description: Total number of items that match the query. - name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field. ``` ### Examples ### ListGroupRequests ```curl ~~~cURL curl -X GET \ https://wixapis.com/social-groups/v2/group-requests?limit=100&ownershipFilter=CURRENT_MEMBER \ -H 'Content-Type: application/json;charset=UTF-8' \ -H 'Authorization: ' ~~~ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.groups.GroupRequestsService.listGroupRequests(options) Description: Lists group requests across a site. Method parameters: param name: options | type: ListGroupRequestsOptions none - name: limit | type: integer | description: Number of items to load. Maximum `100`. - name: offset | type: integer | description: Number of items to skip in the current sort order. Return type: PROMISE - name: groupRequests | type: array | description: Group Requests. - name: _id | type: string | description: Group request GUID. - name: group | type: Group | description: Group requested for creation. - name: _id | type: string | description: Group GUID. - name: slug | type: string | description: A unique part of a group's URL, for example `https:/example.com/groups/slug`. - name: privacyStatus | type: PrivacyStatus | description: Group privacy status. - enum: - UNKNOWN: Undefined group privacy status. - PUBLIC: Anyone can see the group and its content. Anyone can join the group. - PRIVATE: Anyone can see the group, but only members can see its content. New members must submit a `Join Group Request`. - SECRET: Only admins and members can see the group. New members can only be added by other members. - name: name | type: string | description: Group name. - name: description | type: string | description: Group description in [DraftJS](https://draftjs.org) format. - name: teaser | type: string | description: Group teaser. - name: memberTitle | type: string | description: What group members are called, for example `Coworkers`, `Friends`, or `Students`. - name: coverImage | type: CoverImage | description: Cover image. You cannot upload your own cover image. - name: image | type: Image | description: Cover image. - name: mediaId | type: string | description: Image GUID (for internal use). - name: width | type: integer | description: Image width. - name: height | type: integer | description: Image height. - name: preset | type: boolean | description: Indicates pre-configured/auto-generated images (from templates, client generated). - name: position | type: Position | description: Position of the corner of the cover image (or logo). - name: x | type: float | description: horizontal coordinate - name: y | type: float | description: vertical coordinate - name: mobilePosition | type: Position | description: Position of the corner of the cover image (or logo) for mobile browser. - name: altText | type: string | description: Alternative text is typically a relatively short phrase that describes what the image depicts. The alternative text is used: + If the browser cannot display the image. + If the user is utilizing a screen reader. + By search engines to understand what images are on your site. - name: settings | type: GroupSettings | description: Group specific settings. These settings can also be found in [a site's Dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fwix-groups/settings?). - name: welcomeMemberPostEnabled | type: boolean | description: Whether a daily post about new members is enabled. - name: groupDetailsChangedPostEnabled | type: boolean | description: Whether an automatic post about changing the group details is enabled. - name: showMemberList | type: boolean | description: Whether all members can see the full member list. - name: allowedToInviteMembers | type: AllowPolicy | description: Determines who can invite members to the group - enum: UNKNOWN, OWNER_AND_ADMINS, OWNER, ALL_MEMBERS - name: allowedToApproveJoinRequests | type: AllowPolicy | description: Determines who can approve member join requests to the group - name: aiSpamProtectionEnabled | type: boolean | description: Whether AI spam protection is enabled for post creation in the group. If not explicitly set, the default behavior is 'true' (enabled). - name: membersCount | type: integer | description: Total count of current group members. - name: ownerId | type: string | description: Group owner. - name: _createdDate | type: Date | description: Group creation date and time. - name: _updatedDate | type: Date | description: Date and time of the latest group update. - name: lastActivityDate | type: Date | description: Date and time of the most recent group activity, for example a post or comment. - name: status | type: RequestStatus | description: Status of group request. - enum: - PENDING: Pending group request. - APPROVED: Approved group request. - REJECTED: Rejected group request. - CANCELED: Canceled group request. - name: requestDetails | type: RequestDetails | description: Group request details. - name: rejectionReason | type: string | description: Reason the request has been rejected. - name: metadata | type: PagingMetadata | description: Paging information. - name: count | type: integer | description: Number of items returned in the response. - name: offset | type: integer | description: Offset that was requested. - name: total | type: integer | description: Total number of items that match the query. - name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field. ``` ### Examples ### listGroupRequests ```javascript import { groupRequests } from '@wix/groups'; async function listGroupRequests(options) { const response = await groupRequests.listGroupRequests(options); }; ``` ### listGroupRequests (with elevated permissions) ```javascript import { groupRequests } from '@wix/groups'; import { auth } from '@wix/essentials'; async function myListGroupRequestsMethod(options) { const elevatedListGroupRequests = auth.elevate(groupRequests.listGroupRequests); const response = await elevatedListGroupRequests(options); } ``` ### listGroupRequests (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { groupRequests } from '@wix/groups'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { groupRequests }, // Include the auth strategy and host as relevant }); async function listGroupRequests(options) { const response = await myWixClient.groupRequests.listGroupRequests(options); }; ``` ---