Groups API (Draft WIP) - lolmaxz/vrc-ts GitHub Wiki

Groups API Documentation

The Groups API allows you to manage groups in VRChat—create, update, delete groups, manage group members, roles, announcements, galleries, and more.


Index

  1. searchGroups - Search for groups by query.
  2. createGroup - Create a new group.
  3. getGroupByID - Get detailed information about a specific group.
  4. updateGroup - Update information about a specific group.
  5. deleteGroup - Delete a group.
  6. getGroupPosts - Retrieve posts from a group.
  7. createGroupPost - Create a new post in a group.
  8. deleteGroupPost - Delete a post from a group.
  9. getGroupAuditLogs - Retrieve audit logs for a group.
  10. getGroupBans - Get a list of banned users in a group.
  11. banGroupMember - Ban a user from a group.
  12. unbanGroupMember - Unban a user from a group.
  13. createGroupGallery - Create a new gallery in a group.
  14. getGroupGalleryImages - Get images from a group gallery.
  15. updateGroupGallery - Update a group gallery.
  16. deleteGroupGallery - Delete a group gallery.
  17. addGroupGalleryImage - Add an image to a group gallery.
  18. deleteGroupGalleryImage - Delete an image from a group gallery.
  19. getGroupInvitesSent - Get sent group invites.
  20. inviteUserToGroup - Invite a user to a group.
  21. deleteUserInvite - Delete a group invite sent to a user.
  22. joinGroup - Join a group.
  23. leaveGroup - Leave a group.
  24. listGroupMembers - List members of a group.
  25. getGroupMember - Get information about a group member.
  26. updateGroupMember - Update a group member's information.
  27. kickGroupMember - Kick a member from a group.
  28. addRoleToGroupMember - Add a role to a group member.
  29. removeRoleFromGroupMember - Remove a role from a group member.
  30. listGroupPermissions - List possible permissions for a group.
  31. getGroupJoinRequests - Get join requests for a group.
  32. cancelGroupJoinRequest - Cancel a join request to a group.
  33. respondGroupJoinRequest - Respond to a group join request.
  34. getGroupRoles - Get roles in a group.
  35. createGroupRole - Create a new role in a group.
  36. updateGroupRole - Update a role in a group.
  37. deleteGroupRole - Delete a role from a group.
  38. getGroupInstances - Get instances of a group.
  39. editGroupPost - Edit a group post.

Endpoints

1. searchGroups

Search for groups by query.

Purpose

Search for groups by name or shortcode.

Method Signature

searchGroups(options: {
  n?: number;
  offset?: number;
  query: string;
}): Promise<LimitedGroup[]>

Parameters

  • options (object):

    • query (string, required):
      The search query, which can be a group name or shortcode.

    • n (number, optional):
      Number of results to return (1-100). Default is 10.

    • offset (number, optional):
      Offset from the first result. Must be 0 or greater.

Returns

  • Promise<LimitedGroup[]>: A promise that resolves to an array of limited group objects.

Example Usage

// Example: Search for groups with the name "Explorers"
const groups = await vrchatApi.groupApi.searchGroups({
  query: 'Explorers',
  n: 20,
});
console.log(groups);

2. createGroup

Create a new group.

Purpose

Create a new group. Note: You must have a VRChat Plus (VRC+) subscription to use this method.

Method Signature

createGroup(options: {
  name: string;
  shortCode: string;
  roleTemplate: 'default' | 'managedFree' | 'managedInvite' | 'managedRequest';
  description?: string;
  joinState?: 'open' | 'invite' | 'request' | 'closed';
  iconId?: string;
  bannerId?: string;
  privacy?: 'default' | 'private';
}): Promise<Group>

Parameters

  • options (object):

    • name (string, required):
      Name of the group (3-64 characters).

    • shortCode (string, required):
      Short code for the group (3-6 characters).

    • roleTemplate (string, required):
      Role template for the group. Options: 'default', 'managedFree', 'managedInvite', 'managedRequest'.

    • description (string, optional):
      Description of the group (0-250 characters).

    • joinState (string, optional):
      How users can join the group. Options: 'open', 'invite', 'request', 'closed'. Default is 'open'.

    • iconId (string, optional):
      Icon file ID for the group.

    • bannerId (string, optional):
      Banner file ID for the group.

    • privacy (string, optional):
      Privacy setting of the group. Options: 'default', 'private'. Default is 'default'.

Returns

  • Promise<Group>: A promise that resolves to the created group object.

Example Usage

// Example: Create a new group
const newGroup = await vrchatApi.groupApi.createGroup({
  name: 'Adventurers Guild',
  shortCode: 'ADV',
  roleTemplate: 'managedFree',
  description: 'A group for adventurers.',
  joinState: 'open',
});
console.log(newGroup);

3. getGroupByID

Get detailed information about a specific group.

Purpose

Retrieve detailed information about a group by its ID.

Method Signature

getGroupByID(options: {
  groupId: string;
  includeRoles?: boolean;
}): Promise<Group>

Parameters

  • options (object):

    • groupId (string, required):
      The ID of the group to retrieve.

    • includeRoles (boolean, optional):
      Whether to include role information. Default is false.

Returns

  • Promise<Group>: A promise that resolves to the group object.

Example Usage

// Example: Get information about a specific group
const groupId = 'grp_12345678-1234-1234-1234-1234567890ab';
const groupInfo = await vrchatApi.groupApi.getGroupByID({ groupId, includeRoles: true });
console.log(groupInfo);

4. updateGroup

Update information about a specific group.

Purpose

Update details of a group such as name, description, join state, and more.

Method Signature

updateGroup(options: {
  groupId: string;
  name?: string;
  shortCode?: string;
  description?: string;
  joinState?: 'open' | 'invite' | 'request' | 'closed';
  iconId?: string;
  bannerId?: string;
  languages?: string[];
  links?: string[];
  rules?: string;
  tags?: string[];
}): Promise<Group>

Parameters

  • options (object):

    • groupId (string, required):
      The ID of the group to update.

    • Other optional fields:

      • name (string, optional):
        New name for the group (3-64 characters).

      • shortCode (string, optional):
        New short code (3-6 characters).

      • description (string, optional):
        New description (0-250 characters).

      • joinState (string, optional):
        New join state ('open', 'invite', 'request', 'closed').

      • iconId (string, optional):
        New icon file ID.

      • bannerId (string, optional):
        New banner file ID.

      • languages (string[], optional):
        Language tags (up to 3).

      • links (string[], optional):
        Links associated with the group (up to 3).

      • rules (string, optional):
        Group rules (0-2048 characters).

      • tags (string[], optional):
        Tags for the group.

Returns

  • Promise<Group>: A promise that resolves to the updated group object.

Example Usage

// Example: Update a group's description and tags
const updatedGroup = await vrchatApi.groupApi.updateGroup({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  description: 'An updated description.',
  tags: ['gaming', 'community'],
});
console.log(updatedGroup);

5. deleteGroup

Delete a group.

Purpose

Delete a group. Warning: This action is irreversible.

Method Signature

deleteGroup(options: { groupId: string }): Promise<RequestSuccess>

Parameters

  • options (object):

    • groupId (string, required):
      The ID of the group to delete.

Returns

  • Promise<RequestSuccess>: A promise that resolves to a success object.

Example Usage

// Example: Delete a group
const response = await vrchatApi.groupApi.deleteGroup({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
});
console.log(response);

6. getGroupPosts

Retrieve posts from a group.

Purpose

Get posts made in a group. If no posts are made, it returns an object with the total posts and an empty array.

Method Signature

getGroupPosts(options: {
  groupId: string;
  n?: number;
  offset?: number;
  publicOnly?: boolean;
}): Promise<{ total: number; posts: GroupPost[] }>

Parameters

  • options (object):

    • groupId (string, required):
      The ID of the group.

    • n (number, optional):
      Number of posts to retrieve.

    • offset (number, optional):
      Offset from the first post.

    • publicOnly (boolean, optional):
      Whether to retrieve only public posts. Default is false.

Returns

  • Promise<{ total: number; posts: GroupPost[] }>: A promise that resolves to an object containing total posts and an array of posts.

Example Usage

// Example: Get recent posts from a group
const groupPosts = await vrchatApi.groupApi.getGroupPosts({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  n: 10,
});
console.log(groupPosts);

7. createGroupPost

Create a new post in a group.

Purpose

Create a new post within a group.

Method Signature

createGroupPost(options: {
  groupId: string;
  title: string;
  content: string;
  visibility: 'group' | 'public';
  imageId?: string;
  sendNotification?: boolean;
  roleIds?: string[];
}): Promise<GroupPost>

Parameters

  • options (object):

    • groupId (string, required):
      The ID of the group.

    • title (string, required):
      Title of the post (min 1 character).

    • content (string, required):
      Content of the post (min 1 character).

    • visibility (string, required):
      Visibility of the post. Options: 'group' (members only), 'public' (everyone).

    • imageId (string, optional):
      Image file ID to attach.

    • sendNotification (boolean, optional):
      Whether to send a notification. Default is true.

    • roleIds (string[], optional):
      Role IDs that can view the post. Ignored if visibility is 'public'.

Returns

  • Promise<GroupPost>: A promise that resolves to the created post object.

Example Usage

// Example: Create a new group post
const newPost = await vrchatApi.groupApi.createGroupPost({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  title: 'Welcome to the Group!',
  content: 'Hello everyone, welcome to our group.',
  visibility: 'group',
  sendNotification: true,
});
console.log(newPost);

8. deleteGroupPost

Delete a post from a group.

Purpose

Delete a post from a group.

Method Signature

deleteGroupPost(options: {
  groupId: string;
  postId: string;
}): Promise<RequestSuccess>

Parameters

  • options (object):

    • groupId (string, required):
      The ID of the group.

    • postId (string, required):
      The ID of the post to delete.

Returns

  • Promise<RequestSuccess>: A promise that resolves to a success object.

Example Usage

// Example: Delete a group post
const response = await vrchatApi.groupApi.deleteGroupPost({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  postId: 'post_12345678-1234-1234-1234-1234567890ab',
});
console.log(response);

9. getGroupAuditLogs

Retrieve audit logs for a group.

Purpose

Retrieve the audit logs for administrative actions taken within a group.

Method Signature

getGroupAuditLogs(options: {
  groupId: string;
  n?: number;
  offset?: number;
  startDate?: string;
  endDate?: string;
}): Promise<GroupAudit>

Parameters

  • options (object):

    • groupId (string, required):
      The ID of the group.

    • n (number, optional):
      Number of logs to retrieve (1-100).

    • offset (number, optional):
      Offset from the first log.

    • startDate (string, optional):
      Start date for logs (ISO 8601 format).

    • endDate (string, optional):
      End date for logs (ISO 8601 format).

Returns

  • Promise<GroupAudit>: A promise that resolves to an object containing audit logs.

Example Usage

// Example: Get audit logs for a group
const auditLogs = await vrchatApi.groupApi.getGroupAuditLogs({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  n: 50,
});
console.log(auditLogs);

10. getGroupBans

Get a list of banned users in a group.

Purpose

Retrieve a list of users who have been banned from a group.

Method Signature

getGroupBans(options: {
  groupId: string;
  n?: number;
  offset?: number;
}): Promise<GroupMember[]>

Parameters

  • options (object):

    • groupId (string, required):
      The ID of the group.

    • n (number, optional):
      Number of banned users to retrieve (1-100).

    • offset (number, optional):
      Offset from the first banned user.

Returns

  • Promise<GroupMember[]>: A promise that resolves to an array of banned group members.

Example Usage

// Example: Get list of banned users in a group
const bannedUsers = await vrchatApi.groupApi.getGroupBans({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  n: 20,
});
console.log(bannedUsers);

11. banGroupMember

Ban a user from a group.

Purpose

Ban a user from the specified group.

Method Signature

banGroupMember(options: {
  groupId: string;
  userId: string;
}): Promise<GroupMember>

Parameters

  • options (object):

    • groupId (string, required):
      The ID of the group.

    • userId (string, required):
      The ID of the user to ban.

Returns

  • Promise<GroupMember>: A promise that resolves to the banned group member object.

Example Usage

// Example: Ban a user from a group
const bannedMember = await vrchatApi.groupApi.banGroupMember({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  userId: 'usr_abcdef12-3456-7890-abcd-ef1234567890',
});
console.log(bannedMember);

12. unbanGroupMember

Unban a user from a group.

Purpose

Remove a ban from a user in the specified group.

Method Signature

unbanGroupMember(options: {
  groupId: string;
  userId: string;
}): Promise<GroupMember>

Parameters

  • options (object):

    • groupId (string, required):
      The ID of the group.

    • userId (string, required):
      The ID of the user to unban.

Returns

  • Promise<GroupMember>: A promise that resolves to the unbanned group member object.

Example Usage

// Example: Unban a user from a group
const unbannedMember = await vrchatApi.groupApi.unbanGroupMember({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  userId: 'usr_abcdef12-3456-7890-abcd-ef1234567890',
});
console.log(unbannedMember);

13. createGroupGallery

Create a new gallery in a group.

Purpose

Create a gallery within a group for sharing images.

Method Signature

createGroupGallery(options: {
  groupId: string;
  name: string;
  description?: string;
  membersOnly?: boolean;
  roleIdsToView?: string[];
  roleIdsToSubmit?: string[];
  roleIdsToAutoApprove?: string[];
  roleIdsToManage?: string[];
}): Promise<GroupGallery>

Parameters

  • options (object):

    • groupId (string, required):
      The ID of the group.

    • name (string, required):
      Name of the gallery (min 1 character).

    • description (string, optional):
      Description of the gallery.

    • membersOnly (boolean, optional):
      Whether the gallery is members-only. Default is false.

    • roleIdsToView (string[], optional):
      Role IDs that can view the gallery.

    • roleIdsToSubmit (string[], optional):
      Role IDs that can submit to the gallery.

    • roleIdsToAutoApprove (string[], optional):
      Role IDs that can auto-approve submissions.

    • roleIdsToManage (string[], optional):
      Role IDs that can manage the gallery.

Returns

  • Promise<GroupGallery>: A promise that resolves to the created gallery object.

Example Usage

// Example: Create a new gallery in a group
const newGallery = await vrchatApi.groupApi.createGroupGallery({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  name: 'Event Photos',
  description: 'Photos from group events.',
  membersOnly: true,
});
console.log(newGallery);

14. getGroupGalleryImages

Get images from a group gallery.

Purpose

Retrieve images from a specified gallery within a group.

Method Signature

getGroupGalleryImages(options: {
  groupId: string;
  groupGalleryId: string;
  n?: number;
  offset?: number;
  approved?: boolean;
}): Promise<GroupGalleryImage[]>

Parameters

  • options (object):

    • groupId (string, required):
      The ID of the group.

    • groupGalleryId (string, required):
      The ID of the gallery.

    • n (number, optional):
      Number of images to retrieve (1-100).

    • offset (number, optional):
      Offset from the first image.

    • approved (boolean, optional):
      Whether to include only approved images. Default is true.

Returns

  • Promise<GroupGalleryImage[]>: A promise that resolves to an array of gallery images.

Example Usage

// Example: Get images from a group gallery
const galleryImages = await vrchatApi.groupApi.getGroupGalleryImages({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  groupGalleryId: 'gal_12345678-1234-1234-1234-1234567890ab',
  n: 10,
});
console.log(galleryImages);

15. updateGroupGallery

Update a group gallery.

Purpose

Update details of a group gallery such as name, description, and permissions.

Method Signature

updateGroupGallery(options: {
  groupId: string;
  groupGalleryId: string;
  name?: string;
  description?: string;
  membersOnly?: boolean;
  roleIdsToView?: string[];
  roleIdsToSubmit?: string[];
  roleIdsToAutoApprove?: string[];
  roleIdsToManage?: string[];
}): Promise<GroupGallery>

Parameters

  • options (object):

    • groupId (string, required)

    • groupGalleryId (string, required)

    • Other optional fields:

      • name (string, optional)

      • description (string, optional)

      • membersOnly (boolean, optional)

      • roleIdsToView (string[], optional)

      • roleIdsToSubmit (string[], optional)

      • roleIdsToAutoApprove (string[], optional)

      • roleIdsToManage (string[], optional)

Returns

  • Promise<GroupGallery>: A promise that resolves to the updated gallery object.

Example Usage

// Example: Update a group gallery
const updatedGallery = await vrchatApi.groupApi.updateGroupGallery({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  groupGalleryId: 'gal_12345678-1234-1234-1234-1234567890ab',
  description: 'Updated gallery description.',
});
console.log(updatedGallery);

16. deleteGroupGallery

Delete a group gallery.

Purpose

Delete a gallery from a group.

Method Signature

deleteGroupGallery(options: {
  groupId: string;
  groupGalleryId: string;
}): Promise<RequestSuccess>

Parameters

  • options (object):

    • groupId (string, required)

    • groupGalleryId (string, required)

Returns

  • Promise<RequestSuccess>: A promise that resolves to a success object.

Example Usage

// Example: Delete a group gallery
const response = await vrchatApi.groupApi.deleteGroupGallery({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  groupGalleryId: 'gal_12345678-1234-1234-1234-1234567890ab',
});
console.log(response);

17. addGroupGalleryImage

Add an image to a group gallery.

Purpose

Add an image to a specified gallery in a group.

Method Signature

addGroupGalleryImage(options: {
  groupId: string;
  groupGalleryId: string;
  fileId: string;
}): Promise<GroupGalleryImage>

Parameters

  • options (object):

    • groupId (string, required)

    • groupGalleryId (string, required)

    • fileId (string, required):
      The file ID of the image to add.

Returns

  • Promise<GroupGalleryImage>: A promise that resolves to the added gallery image object.

Example Usage

// Example: Add an image to a group gallery
const newImage = await vrchatApi.groupApi.addGroupGalleryImage({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  groupGalleryId: 'gal_12345678-1234-1234-1234-1234567890ab',
  fileId: 'file_abcdef12-3456-7890-abcd-ef1234567890',
});
console.log(newImage);

18. deleteGroupGalleryImage

Delete an image from a group gallery.

Purpose

Remove an image from a group gallery.

Method Signature

deleteGroupGalleryImage(options: {
  groupId: string;
  groupGalleryId: string;
  groupGalleryImageId: string;
}): Promise<RequestSuccess>

Parameters

  • options (object):

    • groupId (string, required)

    • groupGalleryId (string, required)

    • groupGalleryImageId (string, required)

Returns

  • Promise<RequestSuccess>: A promise that resolves to a success object.

Example Usage

// Example: Delete an image from a group gallery
const response = await vrchatApi.groupApi.deleteGroupGalleryImage({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  groupGalleryId: 'gal_12345678-1234-1234-1234-1234567890ab',
  groupGalleryImageId: 'img_abcdef12-3456-7890-abcd-ef1234567890',
});
console.log(response);

19. getGroupInvitesSent

Get sent group invites.

Purpose

Retrieve a list of users who have been invited to join the group.

Method Signature

getGroupInvitesSent(options: { groupId: string }): Promise<GroupMember[]>

Parameters

  • options (object):

    • groupId (string, required)

Returns

  • Promise<GroupMember[]>: A promise that resolves to an array of group members who have been invited.

Example Usage

// Example: Get sent group invites
const invites = await vrchatApi.groupApi.getGroupInvitesSent({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
});
console.log(invites);

20. inviteUserToGroup

Invite a user to a group.

Purpose

Send an invitation to a user to join a group.

Method Signature

inviteUserToGroup(options: {
  groupId: string;
  userId: string;
  confirmOverrideBlock?: boolean;
}): Promise<boolean>

Parameters

  • options (object):

    • groupId (string, required)

    • userId (string, required)

    • confirmOverrideBlock (boolean, optional):
      Whether to override a block if the user is blocking you.

Returns

  • Promise<boolean>: A promise that resolves to true if the invitation was sent successfully.

Example Usage

// Example: Invite a user to a group
const success = await vrchatApi.groupApi.inviteUserToGroup({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  userId: 'usr_abcdef12-3456-7890-abcd-ef1234567890',
});
console.log(success); // true

21. deleteUserInvite

Delete a group invite sent to a user.

Purpose

Cancel an invitation sent to a user.

Method Signature

deleteUserInvite(options: {
  groupId: string;
  userId: string;
}): Promise<boolean>

Parameters

  • options (object):

    • groupId (string, required)

    • userId (string, required)

Returns

  • Promise<boolean>: A promise that resolves to true if the invitation was canceled successfully.

Example Usage

// Example: Delete a user invite
const success = await vrchatApi.groupApi.deleteUserInvite({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  userId: 'usr_abcdef12-3456-7890-abcd-ef1234567890',
});
console.log(success); // true

22. joinGroup

Join a group.

Purpose

Request to join a group or accept an invitation.

Method Signature

joinGroup(options: { groupId: string }): Promise<GroupMember[]>

Parameters

  • options (object):

    • groupId (string, required)

Returns

  • Promise<GroupMember[]>: A promise that resolves to an array of group members (usually includes your own member object).

Example Usage

// Example: Join a group
const members = await vrchatApi.groupApi.joinGroup({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
});
console.log(members);

23. leaveGroup

Leave a group.

Purpose

Leave the specified group.

Method Signature

leaveGroup(options: { groupId: string }): Promise<boolean>

Parameters

  • options (object):

    • groupId (string, required)

Returns

  • Promise<boolean>: A promise that resolves to true if you left the group successfully.

Example Usage

// Example: Leave a group
const success = await vrchatApi.groupApi.leaveGroup({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
});
console.log(success); // true

24. listGroupMembers

List members of a group.

Purpose

Retrieve a list of members in a group.

Method Signature

listGroupMembers(options: {
  groupId: string;
  n?: number;
  offset?: number;
  sort?: 'joinedAt:asc' | 'joinedAt:desc';
  roleId?: string;
}): Promise<GroupMember[]>

Parameters

  • options (object):

    • groupId (string, required)

    • n (number, optional):
      Number of members to retrieve (1-100). Default is 60.

    • offset (number, optional)

    • sort (string, optional):
      Sorting order. Options: 'joinedAt:asc', 'joinedAt:desc'.

    • roleId (string, optional):
      Filtering group members that have a specific Group Role, by Group Role ID.

Returns

  • Promise<GroupMember[]>: A promise that resolves to an array of group members.

Example Usage

// Example: List members of a group
const members = await vrchatApi.groupApi.listGroupMembers({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  n: 50,
  sort: 'joinedAt:desc',
});
console.log(members);

25. getGroupMember

Get information about a group member.

Purpose

Retrieve detailed information about a specific member of a group.

Method Signature

getGroupMember(options: {
  groupId: string;
  userId: string;
}): Promise<GroupMember>

Parameters

  • options (object):

    • groupId (string, required)

    • userId (string, required)

Returns

  • Promise<GroupMember>: A promise that resolves to the group member object.

Example Usage

// Example: Get information about a group member
const memberInfo = await vrchatApi.groupApi.getGroupMember({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  userId: 'usr_abcdef12-3456-7890-abcd-ef1234567890',
});
console.log(memberInfo);

26. updateGroupMember

Update a group member's information.

Purpose

Update settings for a group member, such as visibility or subscription status.

Method Signature

updateGroupMember(options: {
  groupId: string;
  userId: string;
  visibility?: 'visible' | 'hidden' | 'friends';
  isSubscribedToAnnouncements?: boolean;
  managerNotes?: string;
}): Promise<GroupMemberLimitedUser>

Parameters

  • options (object):

    • groupId (string, required)

    • userId (string, required)

    • Other optional fields:

      • visibility (string, optional)

      • isSubscribedToAnnouncements (boolean, optional)

      • managerNotes (string, optional)

Returns

  • Promise<GroupMemberLimitedUser>: A promise that resolves to the limited user information.

Example Usage

// Example: Update a group member's visibility
const updatedMember = await vrchatApi.groupApi.updateGroupMember({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  userId: 'usr_abcdef12-3456-7890-abcd-ef1234567890',
  visibility: 'friends',
});
console.log(updatedMember);

27. kickGroupMember

Kick a member from a group.

Purpose

Remove a member from the group.

Method Signature

kickGroupMember(options: {
  groupId: string;
  userId: string;
}): Promise<boolean>

Parameters

  • options (object):

    • groupId (string, required)

    • userId (string, required)

Returns

  • Promise<boolean>: A promise that resolves to true if the member was kicked successfully.

Example Usage

// Example: Kick a member from a group
const success = await vrchatApi.groupApi.kickGroupMember({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  userId: 'usr_abcdef12-3456-7890-abcd-ef1234567890',
});
console.log(success); // true

28. addRoleToGroupMember

Add a role to a group member.

Purpose

Assign a role to a group member.

Method Signature

addRoleToGroupMember(options: {
  groupId: string;
  userId: string;
  groupRoleId: string;
}): Promise<string[]>

Parameters

  • options (object):

    • groupId (string, required)

    • userId (string, required)

    • groupRoleId (string, required)

Returns

  • Promise<string[]>: A promise that resolves to an array of role IDs assigned to the user.

Example Usage

// Example: Add a role to a group member
const roles = await vrchatApi.groupApi.addRoleToGroupMember({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  userId: 'usr_abcdef12-3456-7890-abcd-ef1234567890',
  groupRoleId: 'role_12345678-1234-1234-1234-1234567890ab',
});
console.log(roles);

29. removeRoleFromGroupMember

Remove a role from a group member.

Purpose

Remove a role assignment from a group member.

Method Signature

removeRoleFromGroupMember(options: {
  groupId: string;
  userId: string;
  groupRoleId: string;
}): Promise<string[]>

Parameters

  • options (object):

    • Same as in addRoleToGroupMember

Returns

  • Promise<string[]>: A promise that resolves to the updated array of role IDs assigned to the user.

Example Usage

// Example: Remove a role from a group member
const roles = await vrchatApi.groupApi.removeRoleFromGroupMember({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  userId: 'usr_abcdef12-3456-7890-abcd-ef1234567890',
  groupRoleId: 'role_12345678-1234-1234-1234-1234567890ab',
});
console.log(roles);

30. listGroupPermissions

List possible permissions for a group.

Purpose

Retrieve a list of all available permissions that can be assigned within a group.

Method Signature

listGroupPermissions(options: {
  groupId: string;
}): Promise<GroupPermission[]>

Parameters

  • options (object):

    • groupId (string, required)

Returns

  • Promise<GroupPermission[]>: A promise that resolves to an array of group permissions.

Example Usage

// Example: List group permissions
const permissions = await vrchatApi.groupApi.listGroupPermissions({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
});
console.log(permissions);

31. getGroupJoinRequests

Get join requests for a group.

Purpose

Retrieve a list of users who have requested to join the group.

Method Signature

getGroupJoinRequests(options: {
  groupId: string;
}): Promise<GroupMember[]>

Parameters

  • options (object):

    • groupId (string, required)

Returns

  • Promise<GroupMember[]>: A promise that resolves to an array of group members who have requested to join.

Example Usage

// Example: Get group join requests
const requests = await vrchatApi.groupApi.getGroupJoinRequests({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
});
console.log(requests);

32. cancelGroupJoinRequest

Cancel a join request to a group.

Purpose

Cancel a pending join request to a group.

Method Signature

cancelGroupJoinRequest(options: {
  groupId: string;
}): Promise<boolean>

Parameters

  • options (object):

    • groupId (string, required)

Returns

  • Promise<boolean>: A promise that resolves to true if the request was canceled successfully.

Example Usage

// Example: Cancel a join request
const success = await vrchatApi.groupApi.cancelGroupJoinRequest({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
});
console.log(success); // true

33. respondGroupJoinRequest

Respond to a group join request.

Purpose

Accept or decline a user's request to join the group.

Method Signature

respondGroupJoinRequest(options: {
  groupId: string;
  userId: string;
  action: 'accept' | 'deny';
}): Promise<boolean>

Parameters

  • options (object):

    • groupId, userId (string, required)

    • action (string, required):
      Action to take. Options: 'accept', 'deny'.

Returns

  • Promise<boolean>: A promise that resolves to true if the action was successful.

Example Usage

// Example: Accept a user's join request
const success = await vrchatApi.groupApi.respondGroupJoinRequest({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  userId: 'usr_abcdef12-3456-7890-abcd-ef1234567890',
  action: 'accept',
});
console.log(success); // true

34. getGroupRoles

Get roles in a group.

Purpose

Retrieve all roles defined within a group.

Method Signature

getGroupRoles(options: {
  groupId: string;
}): Promise<GroupRole[]>

Parameters

  • options (object):

    • groupId (string, required)

Returns

  • Promise<GroupRole[]>: A promise that resolves to an array of group roles.

Example Usage

// Example: Get roles in a group
const roles = await vrchatApi.groupApi.getGroupRoles({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
});
console.log(roles);

35. createGroupRole

Create a new role in a group.

Purpose

Add a new role to the group with specified permissions.

Method Signature

createGroupRole(options: {
  groupId: string;
  name: string;
  description?: string;
  isSelfAssignable?: boolean;
  permissions?: GroupPermissionEnum[];
}): Promise<GroupRole>

Parameters

  • options (object):

    • groupId, name (string, required)

    • Other optional fields:

      • description (string, optional)

      • isSelfAssignable (boolean, optional)

      • permissions (array of GroupPermissionEnum, optional)

Returns

  • Promise<GroupRole>: A promise that resolves to the created role object.

Example Usage

// Example: Create a new role
const newRole = await vrchatApi.groupApi.createGroupRole({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  name: 'Event Organizer',
  description: 'Organizes events for the group.',
  permissions: ['group-instance-create', 'group-announcement-manage'],
});
console.log(newRole);

36. updateGroupRole

Update a role in a group.

Purpose

Modify an existing role's properties within a group.

Method Signature

updateGroupRole(options: {
  groupId: string;
  groupRoleId: string;
  name?: string;
  description?: string;
  isSelfAssignable?: boolean;
  permissions?: GroupPermissionEnum[];
  order?: number;
}): Promise<GroupRole[]>

Parameters

  • options (object):

    • groupId, groupRoleId (string, required)

    • Other optional fields:

      • name, description, isSelfAssignable, permissions, order

Returns

  • Promise<GroupRole[]>: A promise that resolves to an array of updated group roles.

Example Usage

// Example: Update a group role
const updatedRoles = await vrchatApi.groupApi.updateGroupRole({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  groupRoleId: 'role_12345678-1234-1234-1234-1234567890ab',
  name: 'Senior Member',
  permissions: ['group-instance-join'],
});
console.log(updatedRoles);

37. deleteGroupRole

Delete a role from a group.

Purpose

Remove a role from the group.

Method Signature

deleteGroupRole(options: {
  groupId: string;
  groupRoleId: string;
}): Promise<GroupRole[]>

Parameters

  • options (object):

    • groupId, groupRoleId (string, required)

Returns

  • Promise<GroupRole[]>: A promise that resolves to an array of remaining group roles.

Example Usage

// Example: Delete a group role
const remainingRoles = await vrchatApi.groupApi.deleteGroupRole({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  groupRoleId: 'role_12345678-1234-1234-1234-1234567890ab',
});
console.log(remainingRoles);

38. getGroupInstances

Get instances of a group.

Purpose

Retrieve a list of active instances associated with a group.

Method Signature

getGroupInstances(options: {
  groupId: string;
}): Promise<GroupInstance[]>

Parameters

  • options (object):

    • groupId (string, required)

Returns

  • Promise<GroupInstance[]>: A promise that resolves to an array of group instances.

Example Usage

// Example: Get group instances
const instances = await vrchatApi.groupApi.getGroupInstances({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
});
console.log(instances);

39. editGroupPost

Edit a group post.

Purpose

Modify an existing post within a group.

Method Signature

editGroupPost(options: {
  groupId: string;
  notificationId: string;
  title?: string;
  text?: string;
  imageId?: string;
  sendNotification?: boolean;
  roleIds?: string[];
  visibility?: 'group' | 'public';
}): Promise<GroupPost>

Parameters

  • options (object):

    • groupId, notificationId (string, required)

    • Other optional fields:

      • title, text, imageId, sendNotification, roleIds, visibility

Returns

  • Promise<GroupPost>: A promise that resolves to the edited post.

Example Usage

// Example: Edit a group post
const editedPost = await vrchatApi.groupApi.editGroupPost({
  groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
  notificationId: 'post_12345678-1234-1234-1234-1234567890ab',
  title: 'Updated Title',
  text: 'Updated content.',
});
console.log(editedPost);

Note: Some methods may require the user to have specific permissions or roles within the group. Ensure you have the necessary permissions before attempting to use these methods.

Please replace placeholder IDs like 'grp_12345678-1234-1234-1234-1234567890ab' with actual IDs as needed.


Additional Notes

  • VRC+ Subscription: Creating groups requires a VRChat Plus subscription.
  • Deprecated Methods: The getGroupAnnouncement, createGroupAnnouncement, and deleteGroupAnnouncement endpoints are deprecated and may be removed in future updates.
  • Permissions: Managing roles, kicking members, and other administrative actions require appropriate permissions within the group.
  • Group Privacy: Groups can be set to different privacy levels ('default' or 'private'), affecting visibility and member interactions.

End of Documentation

Short Summary

Endpoints:

  1. searchGroups: Search for groups by query.
  2. createGroup: Create a new group (VRC+ required).
  3. getGroupByID: Get detailed information about a specific group.
  4. updateGroup: Update information about a specific group.
  5. deleteGroup: Delete a group.
  6. getGroupPosts: Retrieve posts from a group.
  7. createGroupPost: Create a new post in a group.
  8. deleteGroupPost: Delete a post from a group.
  9. getGroupAuditLogs: Retrieve audit logs for a group.
  10. getGroupBans: Get a list of banned users in a group.
  11. banGroupMember: Ban a user from a group.
  12. unbanGroupMember: Unban a user from a group.
  13. createGroupGallery: Create a new gallery in a group.
  14. getGroupGalleryImages: Get images from a group gallery.
  15. updateGroupGallery: Update a group gallery.
  16. deleteGroupGallery: Delete a group gallery.
  17. addGroupGalleryImage: Add an image to a group gallery.
  18. deleteGroupGalleryImage: Delete an image from a group gallery.
  19. getGroupInvitesSent: Get sent group invites.
  20. inviteUserToGroup: Invite a user to a group.
  21. deleteUserInvite: Delete a group invite sent to a user.
  22. joinGroup: Join a group.
  23. leaveGroup: Leave a group.
  24. listGroupMembers: List members of a group.
  25. getGroupMember: Get information about a group member.
  26. updateGroupMember: Update a group member's information.
  27. kickGroupMember: Kick a member from a group.
  28. addRoleToGroupMember: Add a role to a group member.
  29. removeRoleFromGroupMember: Remove a role from a group member.
  30. listGroupPermissions: List possible permissions for a group.
  31. getGroupJoinRequests: Get join requests for a group.
  32. cancelGroupJoinRequest: Cancel a join request to a group.
  33. respondGroupJoinRequest: Respond to a group join request.
  34. getGroupRoles: Get roles in a group.
  35. createGroupRole: Create a new role in a group.
  36. updateGroupRole: Update a role in a group.
  37. deleteGroupRole: Delete a role from a group.
  38. getGroupInstances: Get instances of a group.
  39. editGroupPost: Edit a group post.

⚠️ **GitHub.com Fallback** ⚠️