Class: Groups
Defined in: src/resources/groups.ts:19
API client for Roblox Group endpoints. Provides methods to retrieve group information, shouts, and group memberships.
See
https://create.roblox.com/docs/cloud/reference/Group
Constructors
Constructor
new Groups(http): Groups;Defined in: src/resources/groups.ts:25
Creates a new Groups API client.
Parameters
| Parameter | Type | Description |
|---|---|---|
http | HttpClient | HTTP client for making API requests |
Returns
Groups
Methods
get()
get(groupId): Promise<Group>;Defined in: src/resources/groups.ts:43
Retrieves a Roblox group's information by group ID.
Parameters
| Parameter | Type | Description |
|---|---|---|
groupId | string | The unique group ID (numeric string) |
Returns
Promise<Group>
Promise resolving to the groups's data
Throws
If API key is invalid
Throws
If the group is not found or other API error occurs
Example
const group = await client.groups.get('123456789');
console.log(group.displayName); // "Roblox"See
https://create.roblox.com/docs/cloud/reference/Group#Cloud_GetGroup
listGroupJoinRequests()
listGroupJoinRequests(groupId, options): Promise<JoinRequestItemsPage>;Defined in: src/resources/groups.ts:80
List join requests under a group. Supports additional filtering. Supports pagination for large invite-only groups.
Parameters
| Parameter | Type | Description |
|---|---|---|
groupId | string | The unique group ID (numeric string) |
options | ListOptions & { filter?: string; } | List options including pagination and filtering |
Returns
Promise<JoinRequestItemsPage>
Promise resolving to a page of group invite items
Throws
If API key is invalid
Throws
If the group is not found or other API error occurs
Example
// Get first page of join requests
const page1 = await client.groups.listGroupJoinRequests('123456789', {
maxPageSize: 50
});
// Get next page
const page2 = await client.groups.listGroupJoinRequests('123456789', {
pageToken: page1.nextPageToken
});
// Filter for a specific user
const user = await client.groups.listGroupJoinRequests('123456789', {
filter: "user == 'users/156'"
});See
https://create.roblox.com/docs/cloud/reference/GroupJoinRequest#Cloud_ListGroupJoinRequests
acceptGroupJoinRequest()
acceptGroupJoinRequest(groupId, joinRequestId): Promise<void>;Defined in: src/resources/groups.ts:116
Accept group join request by group ID and join request ID.
Parameters
| Parameter | Type | Description |
|---|---|---|
groupId | string | The unique group ID (numeric string) |
joinRequestId | string | The unique join request ID (numeric string) |
Returns
Promise<void>
Promise resolving when the join request is accepted
Throws
If API key is invalid
Throws
If the group or join request is not found or other API error occurs
Example
await client.groups.acceptGroupJoinRequest('123456789', '987654321');
console.log('Join request accepted');See
https://create.roblox.com/docs/cloud/reference/GroupJoinRequest#Cloud_AcceptGroupJoinRequest
declineGroupJoinRequest()
declineGroupJoinRequest(groupId, joinRequestId): Promise<void>;Defined in: src/resources/groups.ts:145
Decline group join request by group ID and join request ID.
Parameters
| Parameter | Type | Description |
|---|---|---|
groupId | string | The unique group ID (numeric string) |
joinRequestId | string | The unique join request ID (numeric string) |
Returns
Promise<void>
Promise resolving when the join request is declined
Throws
If API key is invalid
Throws
If the group or join request is not found or other API error occurs
Example
await client.groups.declineGroupJoinRequest('123456789', '987654321');
console.log('Join request declined');See
https://create.roblox.com/docs/cloud/reference/GroupJoinRequest#Cloud_DeclineGroupJoinRequest
listGroupMemberships()
listGroupMemberships(groupId, options): Promise<GroupMembershipItemsPage>;Defined in: src/resources/groups.ts:178
List group members in a group. Supports pagination for high membercounts.
Parameters
| Parameter | Type | Description |
|---|---|---|
groupId | string | The unique group ID (numeric string) |
options | ListOptions & { filter?: string; } | List options for pagination |
Returns
Promise<GroupMembershipItemsPage>
Promise resolving to a page of group membership items
Throws
If API key is invalid
Throws
If the group is not found or other API error occurs
Example
const members = await client.groups.listGroupMemberships('123456789');
console.log(members)See
https://create.roblox.com/docs/cloud/reference/GroupMembership#Cloud_ListGroupMemberships
getGroupShout()
getGroupShout(groupId): Promise<GroupShout>;Defined in: src/resources/groups.ts:213
Get group shout by group ID.
Parameters
| Parameter | Type | Description |
|---|---|---|
groupId | string | The unique group ID (numeric string) |
Returns
Promise<GroupShout>
Promise resolving to the group's shout data
Throws
If API key is invalid
Throws
If the group is not found or other API error occurs
Example
const shout = await client.groups.getGroupShout('123456789');
console.log(shout.content); // "Welcome to the group!"See
https://create.roblox.com/docs/cloud/reference/GroupShout#Cloud_GetGroupShout
listGroupRoles()
listGroupRoles(groupId, options): Promise<GroupRolesPage>;Defined in: src/resources/groups.ts:236
List group roles by group ID.
Parameters
| Parameter | Type | Description |
|---|---|---|
groupId | string | The unique group ID (numeric string) |
options | ListOptions | List options for pagination |
Returns
Promise<GroupRolesPage>
Promise resolving to an array of group roles
Throws
If API key is invalid
Throws
If the group is not found or other API error occurs
Example
const roles = await client.groups.listGroupRoles('123456789');
console.log(roles);See
https://create.roblox.com/docs/cloud/reference/GroupRole#Cloud_ListGroupRoles
getGroupRole()
getGroupRole(groupId, roleId): Promise<GroupRole>;Defined in: src/resources/groups.ts:268
Get group role by group ID and role ID.
Parameters
| Parameter | Type | Description |
|---|---|---|
groupId | string | The unique group ID (numeric string) |
roleId | string | The unique role ID (numeric string) |
Returns
Promise<GroupRole>
Promise resolving to the group's role data
Throws
If API key is invalid
Throws
If the group or role is not found or other API error occurs
Example
const role = await client.groups.getGroupRole('123456789', '7920705');
console.log(role.displayName); // "Admin"See
https://create.roblox.com/docs/cloud/reference/GroupRole#Cloud_GetGroupRole
updateGroupMembership()
updateGroupMembership(
groupId,
membershipId,
roleId): Promise<GroupMembershipItem>;Defined in: src/resources/groups.ts:292
Update group membership by group ID, membership ID and role ID.
Parameters
| Parameter | Type | Description |
|---|---|---|
groupId | string | The unique group ID (numeric string) |
membershipId | string | The unique membership ID (numeric string) |
roleId | string | The unique role ID to assign (numeric string) |
Returns
Promise<GroupMembershipItem>
Promise resolving when the group membership is updated
Throws
If API key is invalid
Throws
If the group, membership, or role is not found or other API error occurs
Example
const groupMembership = await client.groups.updateGroupMembership('123456789', '456789123', '7920705');
console.log(groupMembership.role);See
https://create.roblox.com/docs/cloud/reference/GroupMembership#Cloud_UpdateGroupMembership