Classic APIs
ClassicGroupsApi
allGroupRolesForUser_V1

allGroupRolesForUser_V1

Gets a list of all roles for every group that the specified user is in.

Parameters

NameTypeDescription
userIdIdentifierThe id of the user to get roles for.

Example

const { data: allRoles } = await ClassicGroupsApi.allGroupRolesForUser_V1({ userId: 45348281 }); 

Example Data

[
  {
    group: {
      id: 5855434,
      name: "MightyPart Games",
      description: "Lorem ipsum dolor sit amet...",
      owner: {
        hasVerifiedBadge: false,
        userId: 45348281,
        username: "MightyPart",
        displayName: "MightyPart",
      },
      shout: null,
      memberCount: 102,
      isBuildersClubOnly: false,
      publicEntryAllowed: true,
      hasVerifiedBadge: false,
    },
    role: { id: 5855434, name: "MightyPart", rank: 1 },
  },
] 

Endpoint

GET /v1/users/{userId}/groups/roles