Classic APIs
ClassicGroupsApi
allGroupRolesForUser_v2

allGroupRolesForUser_v2

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: groups } = await ClassicGroupsApi.allGroupRolesForUser_v2({ userId: 45348281 }); 

Example Data

[
  {
    group: {
      id: 5850082,
      name: "MightyPart Games",
      memberCount: 108,
      hasVerifiedBadge: false,
    },
    role: { id: 5850082, name: "Mighty Member", rank: 100 },
  },
] 

Endpoint

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