Classic APIs
ClassicGroupsApi
groupsThatUsersFriendsAreIn

groupsThatUsersFriendsAreIn

Gets a list of all groups the specified users' friends are in.

Parameters

NameTypeDescription
userIdIdentifierThe id of the user to get friends groups for.

Example

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

Example Data

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

Endpoint

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