Classic APIs
ClassicGroupsApi
groupMembersWithRole

groupMembersWithRole

Gets group members that have a specified role.

Parameters

NameTypeDescription
groupIdIdentifierThe id of the group.
roleSetIdIdentifierThe id of the role.
limit?10 | 25 | 50 | 100The number of results to be returned.
sortOrder?SortOrderThe order that the results are sorted in.
cursor?stringThe paging cursor for the previous or next page.

Example

const { data: membersWithRole } = await ClassicGroupsApi.groupMembersWithRole({
  groupId: 5850082,
  roleSetId: 38353811,
}); 

Example Data

[
  {
    hasVerifiedBadge: false,
    userId: 45348281,
    username: "MightyPart",
    displayName: "MightyPart",
  },
] 

Endpoint

GET /v1/groups/{groupId}/roles/{roleSetId}/users