> 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 # ListJoinGroupRequests # Package: memberManagement # Namespace: JoinGroupRequestsService # Method link: https://dev.wix.com/docs/api-reference/crm/community/groups/member-management/join-requests/list-join-group-requests.md ## Introduction Retrieves a list of up to 100 join group requests, given the provided paging. Default sorts to created date in descending order. Only group admins can see requests to join their group. Site members can access their own join requests in a site. --- ## REST API ### Schema ``` Method: listJoinGroupRequests Description: Retrieves a list of up to 100 join group requests, given the provided paging. Default sorts to created date in descending order. Only group admins can see requests to join their group. Site members can access their own join requests in a site. URL: https://www.wixapis.com/v2/groups/{groupId}/join-requests Method: GET # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: groupId Method parameters: param name: groupId | type: none | required: true query param name: limit | type: limit | description: Maximum number of join group requests to retrieve. Defaults to 100. query param name: offset | type: offset | description: Number of join group requests to skip in the list. Return type: ListJoinGroupRequestsResponse - name: joinGroupRequests | type: array | description: Retrieved join group requests. - name: siteMemberId | type: string | description: Member GUID. See the Members API for more details. - name: contactId | type: string | description: Contact GUID. See the Contacts API for more details. - name: status | type: RequestStatus | description: Join group request status. - enum: - PENDING: Pending group request. - APPROVED: Approved group request. - REJECTED: Rejected group request. - CANCELED: Canceled group request. - name: requestDetails | type: RequestDetails | description: Join group request details. - name: rejectionReason | type: string | description: Reason the request has been rejected. - name: metadata | type: PagingMetadata | description: - 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 ### ListJoinGroupRequests ```curl ~~~cURL curl -X GET \ https://wixapis.com/social-groups/v2/groups/a4caf853-c0d7-498e-8eaa-3db36522dcbf/join-requests?limit=100&ownershipFilter=CURRENT_MEMBER \ -H 'Content-Type: application/json;charset=UTF-8' \ -H 'Authorization: ' ~~~ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.memberManagement.JoinGroupRequestsService.listJoinGroupRequests(groupId, options) Description: Retrieves a list of up to 100 join group requests, given the provided paging. Default sorts to created date in descending order. Only group admins can see requests to join their group. Site members can access their own join requests in a site. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: groupId Method parameters: param name: groupId | type: string | description: GUID of the group requested to join. | required: true param name: options | type: ListJoinGroupRequestsOptions none - name: limit | type: integer | description: Maximum number of join group requests to retrieve. Defaults to 100. - name: offset | type: integer | description: Number of join group requests to skip in the list. Return type: PROMISE - name: joinGroupRequests | type: array | description: Retrieved join group requests. - name: siteMemberId | type: string | description: Member GUID. See the Members API for more details. - name: contactId | type: string | description: Contact GUID. See the Contacts API for more details. - name: status | type: RequestStatus | description: Join group request status. - enum: - PENDING: Pending group request. - APPROVED: Approved group request. - REJECTED: Rejected group request. - CANCELED: Canceled group request. - name: requestDetails | type: RequestDetails | description: Join group request details. - name: rejectionReason | type: string | description: Reason the request has been rejected. - name: metadata | type: PagingMetadata | description: - 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 ### List some requests to join a group using paging options (with elevated permissions) ```javascript import { joinGroupRequests } from '@wix/groups'; import { auth } from '@wix/essentials'; const elevatedListJoinGroupRequests = auth.elevate(joinGroupRequests.listJoinGroupRequests); // Sample groupId: 'fc3df3c1-36b2-4279-8be1-8e72a05a88c8' // // Sample options value: // { // limit: 2 // offset: 2 // } export async function listJoinGroupRequests(groupId, options) { try { const result = await elevatedListJoinGroupRequests(groupId, options); return result; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to: * joinGroupRequests: [ * { * "requestDetails": {"rejectionReason": "Wrong group."} * "siteMemberId": "7fe8e9e1-d050-4c86-9684-e7f231600a34" * "status": "REJECTED" * }, * { * "requestDetails": {} * "siteMemberId": "937cd3db-e9be-4980-93c1-a6d767a11050" * "status": "APPROVED" * } * ] * metadata: * { * "count": 2 * "offset": 2 * "tooManyToCount": false * "total": 5 * } */ ``` ### List some requests to join a group using paging options ```javascript import { joinGroupRequests } from '@wix/groups'; // Sample groupId: 'fc3df3c1-36b2-4279-8be1-8e72a05a88c8' // // Sample options value: // { // limit: 2 // offset: 2 // } export async function listJoinGroupRequests(groupId, options) { try { const result = await joinGroupRequests.listJoinGroupRequests(groupId, options); return result; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to: * joinGroupRequests: [ * { * "requestDetails": {"rejectionReason": "Wrong group."} * "siteMemberId": "7fe8e9e1-d050-4c86-9684-e7f231600a34" * "status": "REJECTED" * }, * { * "requestDetails": {} * "siteMemberId": "937cd3db-e9be-4980-93c1-a6d767a11050" * "status": "APPROVED" * } * ] * metadata: * { * "count": 2 * "offset": 2 * "tooManyToCount": false * "total": 5 * } */ ``` ### List all requests to join a group (with elevated permissions) ```javascript import { joinGroupRequests } from '@wix/groups'; import { auth } from '@wix/essentials'; // Sample groupId: 'fc3df3c1-36b2-4279-8be1-8e72a05a88c8' const elevatedListJoinGroupRequests = auth.elevate(joinGroupRequests.listJoinGroupRequests); async function listJoinGroupRequests(groupId, options) { try { const result = await elevatedListJoinGroupRequests(groupId); return result; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to: * joinGroupRequests: [ * { * "requestDetails": {"rejectionReason": "none"} * "siteMemberId": "124cd3db-e9be-4980-93c1-a6d767a11099" * "status": "REJECTED" * }, * { * "requestDetails": {} * "siteMemberId": "2f48e9e1-d050-4c86-9684-e7f231600f29" * "status": "APPROVED" * } * ] * metadata: * { * "count": 2 * "offset": 0 * "tooManyToCount": false * "total": 2 * } */ ``` ### List all requests to join a group ```javascript import { joinGroupRequests } from '@wix/groups'; // Sample groupId: 'fc3df3c1-36b2-4279-8be1-8e72a05a88c8' async function listJoinGroupRequests(groupId, options) { try { const result = await joinGroupRequests.listJoinGroupRequests(groupId); return result; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to: * joinGroupRequests: [ * { * "requestDetails": {"rejectionReason": "none"} * "siteMemberId": "124cd3db-e9be-4980-93c1-a6d767a11099" * "status": "REJECTED" * }, * { * "requestDetails": {} * "siteMemberId": "2f48e9e1-d050-4c86-9684-e7f231600f29" * "status": "APPROVED" * } * ] * metadata: * { * "count": 2 * "offset": 0 * "tooManyToCount": false * "total": 2 * } */ ``` ### listJoinGroupRequests (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 { joinGroupRequests } from '@wix/groups'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { joinGroupRequests }, // Include the auth strategy and host as relevant }); async function listJoinGroupRequests(groupId,options) { const response = await myWixClient.joinGroupRequests.listJoinGroupRequests(groupId,options); }; ``` ---