> 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 # Method name: listCreateRequests(paging: Paging, options: Options) # Method package: wixGroupsBackend # Method menu location: wixGroupsBackend --> CreateRequests --> listCreateRequests # Method Link: https://dev.wix.com/docs/velo/apis/wix-groups-backend/create-requests/list-create-requests.md # Method Description: Lists requests to create a group. > **Note:** This function is only relevant if admin approval is required for creating a group, or if the function's `suppressAuth` option is set to `true`. The `listCreateRequests()` function returns a Promise that resolves to a list of up to 1,000 create requests on your site. Sorts by default to `_createdDate` in descending order. Only site admins can see create requests. Site members can access their own create requests in their site. > **Notes:** > + If the `suppressAuth` option is set to `true`, all permissions are overwritten, and all site members can see create requests. > + This function's parameters are positional, and must be specified in the sequence shown in the syntax below. When specifying a parameter, use `null` as a placeholder for any unspecified parameters. For example, to specify `limit` only, call `listCreateRequests(paging, null)`. To specify `supressAuth` only, call `listCreateRequests(null, options)`. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## List requests to create a group ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { createRequests } from 'wix-groups-backend'; export const myListCreateRequestsFunction = webMethod(Permissions.Anyone, () => { return createRequests.listCreateRequests() .then((createRequestsResults) => { const createRequestStatus = createRequestsResults.createRequests[0].status; const createRequestName = createRequestsResults.createRequests[0].group.name; return createRequestsResults; }) .catch((error) => { console.error(error); }); }); /* Promise resolves to: * createRequests: [ * { * "_id": "83636377-b415-4ebe-ba41-df338c5ad6b7" * "status": "PENDING", * "group": { * "_id": "83636377-b415-4ebe-ba41-df338c5ad6b7" * "name": "My Group Request 1" * "slug": "my-group-request-1" * "description": "Welcome to the group! You can connect with other members, get updates and share videos." * "privacyStatus": "PUBLIC" * "coverImage": { * "imageUrl": "wix:image://v1/22j9074e348009011fa9f2d2961b~mv2.jpg/corn.jpg#originWidth=112&originHeight=224", * "position": { * "x": 80, * "y": 53 * } * } * "memberTitle": "Employees" * "memberCount": 1 * "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" * "status": "APPROVED", * "group": { * "_id": "6ff5333-b477-4e9tt-ba4j-df338c5ad6221" * "name": "My Group Request 2" * "slug": "my-group-request-2" * "description": "Welcome to the group! You can connect with other members, get updates and share videos." * "privacyStatus": "PRIVATE" * "coverImage": { * "imageUrl": "wix:image://v1/664e64e348009011fa9f2d2961e~mv2.jpg/time.jpg#originWidth=2922&originHeight=778", * "position": { * "x": 0, * "y": 0 * } * } * "memberTitle": "Friends" * "memberCount": 65 * "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" * } * } * "_id": "57vn211-b477-4e9tt-ba4j-df338c5adf337" * "status": "REJECTED" * "rejectionReason": "This group has inappropriate content.", * "group": { * "_id": "57vn211-b477-4e9tt-ba4j-df338c5adf337" * "name": "My Group Request 3" * "slug": "my-group-request-3" * "description": "Welcome to the group! You can connect with other members, get updates and share videos." * "privacyStatus": "PRIVATE" * "coverImage": { * "imageUrl": "wix:image://v1/ff9074e348009011fa9f2d2961b~mv2.jpg/popcorn.jpg#originWidth=712&originHeight=667", * "position": { * "x": 44, * "y": 15 * } * } * "memberTitle": "Students" * "memberCount": 1 * "settings": { * "groupUpdatePostEnabled": true * "membersCanApprove": true * "membersCanInvite": true * "showMemberList": false * "welcomeMemberPostEnabled": true * } * "lastActivityDate": "Mon Feb 04 2019 01:19:53 GMT+0300" * "_createdDate": "Mon Feb 04 2019 01:19:53 GMT+0300" * "_updatedDate": "Mon Feb 04 2019 01:19:53 GMT+0300" * "owner": "abe5e4e1-d950-4c46-8884-e7f231600d67" * } * } * ], * metadata: * { * "length": 3 * "tooManyToCount": false * "totalCount": 3 * } */ ``` ## List requests to create a group using options ```javascript import { Permissions, webMethod } from 'wix-web-module // Sample paging value: // { // limit: 3, // skip: 1 // } // // Sample options value: // { // suppressAuth: true // } export const myListCreateRequestsFunction = webMethod(Permissions.Anyone, async (paging, options) => { try { const createRequestsResults = await createRequests.listCreateRequests(paging, options); const createRequestStatus = createRequestsResults.createRequests[0].status; const createRequestName = createRequestsResults.createRequests[0].group.name; return createRequestsResults; } catch (error) { console.error(error); } }); /* Promise resolves to: * createRequests: [ * { * "_id": "83636377-b415-4ebe-ba41-df338c5ad6b7" * "status": "PENDING", * "group": { * "_id": "83636377-b415-4ebe-ba41-df338c5ad6b7" * "name": "My Group Request 2" * "slug": "my-group-request-2" * "description": "Welcome to the group! You can connect with other members, get updates and share videos." * "privacyStatus": "PUBLIC" * "coverImage": { * "image": { * "height": 4032 * "mediaId": "https://static.wixstatic.com/media/waz1z1_53219a2f194c4c29bda210ecca987zf99~mv2.jpeg" * "width": 3024 * } * "memberTitle": "Co-workers" * "memberCount": 1 * "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" * "status": "APPROVED", * "group": { * "_id": "6ff5333-b477-4e9tt-ba4j-df338c5ad6221" * "name": "My Group Request 3" * "slug": "my-group-request-3" * "description": "Welcome to the group! You can connect with other members, get updates and share videos." * "privacyStatus": "PRIVATE" * "coverImage": { * "imageUrl": "wix:image://v1/ff9074e348009011fa9f2d2961b~mv2.jpg/oak.jpg#originWidth=400&originHeight=900", * "position": { * "x": 70, * "y": 95 * } * } * "memberTitle": "Students" * "memberCount": 20 * "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" * } * }, * { * "_id": "29005463-64b7-499tt-cc8j-jfj98c5ad9772" * "status": "REJECTED" * "rejectionReason": "This group is only for members of the football team.", * "group": { * "_id": "29005463-64b7-499tt-cc8j-jfj98c5ad9772" * "name": "My Group Request 4" * "slug": "my-group-request-4" * "description": "Welcome to the group! You can connect with other members, get updates and share videos." * "privacyStatus": "PRIVATE" * "coverImage": { * "imageUrl": "wix:image://v1/s9074e348009011fa9f2d2944~mv2.jpg/sugar.jpg#originWidth=560&originHeight=230", * "position": { * "x": 0, * "y": 60 * } * "memberTitle": "Members" * "memberCount": 1 * "settings": { * "groupUpdatePostEnabled": false * "membersCanApprove": true * "membersCanInvite": false * "showMemberList": false * "welcomeMemberPostEnabled": false * } * "lastActivityDate": "Tues Jan 02 2020 09:17:07 GMT+0300" * "_createdDate": "Tues Jan 02 2019 09:17:07 GMT+0300" * "_updatedDate": "Tues Jan 02 2020 09:17:07 GMT+0300" * "owner": "cad5e9e1-jab0-9c46-1344-e79231600cff2" * } * } * ], * metadata: * { * "length": 3 * "tooManyToCount": false * "totalCount": 3 * } */ ``` ---