Lists groups.
The listGroups()
function returns a Promise that resolves to a list of up to 1,000 groups on your site. Sorts by default to _createdDate
in descending order.
Notes:
SECRET
groups, only site admins, group admins, and group members can see a list of group and their content.null
as a placeholder for any unspecified parameters. For example, to specify limit only, call listGroups(paging, null)
.function listGroups(options: ListGroupsOptions): Promise<ListGroupsResponse>;
Limit and offset options.
import { groups } from "wix-groups.v2";
async function listGroups(options) {
try {
const result = await groups.listGroups(options);
return result;
} catch (error) {
console.error(error);
// Handle the error
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.