Groups API (Draft WIP) - lolmaxz/vrc-ts GitHub Wiki
The Groups API allows you to manage groups in VRChat—create, update, delete groups, manage group members, roles, announcements, galleries, and more.
-
searchGroups
- Search for groups by query. -
createGroup
- Create a new group. -
getGroupByID
- Get detailed information about a specific group. -
updateGroup
- Update information about a specific group. -
deleteGroup
- Delete a group. -
getGroupPosts
- Retrieve posts from a group. -
createGroupPost
- Create a new post in a group. -
deleteGroupPost
- Delete a post from a group. -
getGroupAuditLogs
- Retrieve audit logs for a group. -
getGroupBans
- Get a list of banned users in a group. -
banGroupMember
- Ban a user from a group. -
unbanGroupMember
- Unban a user from a group. -
createGroupGallery
- Create a new gallery in a group. -
getGroupGalleryImages
- Get images from a group gallery. -
updateGroupGallery
- Update a group gallery. -
deleteGroupGallery
- Delete a group gallery. -
addGroupGalleryImage
- Add an image to a group gallery. -
deleteGroupGalleryImage
- Delete an image from a group gallery. -
getGroupInvitesSent
- Get sent group invites. -
inviteUserToGroup
- Invite a user to a group. -
deleteUserInvite
- Delete a group invite sent to a user. -
joinGroup
- Join a group. -
leaveGroup
- Leave a group. -
listGroupMembers
- List members of a group. -
getGroupMember
- Get information about a group member. -
updateGroupMember
- Update a group member's information. -
kickGroupMember
- Kick a member from a group. -
addRoleToGroupMember
- Add a role to a group member. -
removeRoleFromGroupMember
- Remove a role from a group member. -
listGroupPermissions
- List possible permissions for a group. -
getGroupJoinRequests
- Get join requests for a group. -
cancelGroupJoinRequest
- Cancel a join request to a group. -
respondGroupJoinRequest
- Respond to a group join request. -
getGroupRoles
- Get roles in a group. -
createGroupRole
- Create a new role in a group. -
updateGroupRole
- Update a role in a group. -
deleteGroupRole
- Delete a role from a group. -
getGroupInstances
- Get instances of a group. -
editGroupPost
- Edit a group post.
Search for groups by query.
Search for groups by name or shortcode.
searchGroups(options: {
n?: number;
offset?: number;
query: string;
}): Promise<LimitedGroup[]>
-
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 is10
. -
offset
(number, optional):
Offset from the first result. Must be 0 or greater.
-
-
Promise<LimitedGroup[]>
: A promise that resolves to an array of limited group objects.
// Example: Search for groups with the name "Explorers"
const groups = await vrchatApi.groupApi.searchGroups({
query: 'Explorers',
n: 20,
});
console.log(groups);
Create a new group.
Create a new group. Note: You must have a VRChat Plus (VRC+) subscription to use this method.
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>
-
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'
.
-
-
Promise<Group>
: A promise that resolves to the created group object.
// 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);
Get detailed information about a specific group.
Retrieve detailed information about a group by its ID.
getGroupByID(options: {
groupId: string;
includeRoles?: boolean;
}): Promise<Group>
-
options
(object):-
groupId
(string, required):
The ID of the group to retrieve. -
includeRoles
(boolean, optional):
Whether to include role information. Default isfalse
.
-
-
Promise<Group>
: A promise that resolves to the group object.
// 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);
Update information about a specific group.
Update details of a group such as name, description, join state, and more.
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>
-
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.
-
-
-
Promise<Group>
: A promise that resolves to the updated group object.
// 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);
Delete a group.
Delete a group. Warning: This action is irreversible.
deleteGroup(options: { groupId: string }): Promise<RequestSuccess>
-
options
(object):-
groupId
(string, required):
The ID of the group to delete.
-
-
Promise<RequestSuccess>
: A promise that resolves to a success object.
// Example: Delete a group
const response = await vrchatApi.groupApi.deleteGroup({
groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
});
console.log(response);
Retrieve posts from a group.
Get posts made in a group. If no posts are made, it returns an object with the total posts and an empty array.
getGroupPosts(options: {
groupId: string;
n?: number;
offset?: number;
publicOnly?: boolean;
}): Promise<{ total: number; posts: GroupPost[] }>
-
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 isfalse
.
-
-
Promise<{ total: number; posts: GroupPost[] }>
: A promise that resolves to an object containing total posts and an array of posts.
// 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);
Create a new post in a group.
Create a new post within a group.
createGroupPost(options: {
groupId: string;
title: string;
content: string;
visibility: 'group' | 'public';
imageId?: string;
sendNotification?: boolean;
roleIds?: string[];
}): Promise<GroupPost>
-
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 istrue
. -
roleIds
(string[], optional):
Role IDs that can view the post. Ignored if visibility is'public'
.
-
-
Promise<GroupPost>
: A promise that resolves to the created post object.
// 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);
Delete a post from a group.
Delete a post from a group.
deleteGroupPost(options: {
groupId: string;
postId: string;
}): Promise<RequestSuccess>
-
options
(object):-
groupId
(string, required):
The ID of the group. -
postId
(string, required):
The ID of the post to delete.
-
-
Promise<RequestSuccess>
: A promise that resolves to a success object.
// 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);
Retrieve audit logs for a group.
Retrieve the audit logs for administrative actions taken within a group.
getGroupAuditLogs(options: {
groupId: string;
n?: number;
offset?: number;
startDate?: string;
endDate?: string;
}): Promise<GroupAudit>
-
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).
-
-
Promise<GroupAudit>
: A promise that resolves to an object containing audit logs.
// 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);
Get a list of banned users in a group.
Retrieve a list of users who have been banned from a group.
getGroupBans(options: {
groupId: string;
n?: number;
offset?: number;
}): Promise<GroupMember[]>
-
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.
-
-
Promise<GroupMember[]>
: A promise that resolves to an array of banned group members.
// 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);
Ban a user from a group.
Ban a user from the specified group.
banGroupMember(options: {
groupId: string;
userId: string;
}): Promise<GroupMember>
-
options
(object):-
groupId
(string, required):
The ID of the group. -
userId
(string, required):
The ID of the user to ban.
-
-
Promise<GroupMember>
: A promise that resolves to the banned group member object.
// 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);
Unban a user from a group.
Remove a ban from a user in the specified group.
unbanGroupMember(options: {
groupId: string;
userId: string;
}): Promise<GroupMember>
-
options
(object):-
groupId
(string, required):
The ID of the group. -
userId
(string, required):
The ID of the user to unban.
-
-
Promise<GroupMember>
: A promise that resolves to the unbanned group member object.
// 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);
Create a new gallery in a group.
Create a gallery within a group for sharing images.
createGroupGallery(options: {
groupId: string;
name: string;
description?: string;
membersOnly?: boolean;
roleIdsToView?: string[];
roleIdsToSubmit?: string[];
roleIdsToAutoApprove?: string[];
roleIdsToManage?: string[];
}): Promise<GroupGallery>
-
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 isfalse
. -
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.
-
-
Promise<GroupGallery>
: A promise that resolves to the created gallery object.
// 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);
Get images from a group gallery.
Retrieve images from a specified gallery within a group.
getGroupGalleryImages(options: {
groupId: string;
groupGalleryId: string;
n?: number;
offset?: number;
approved?: boolean;
}): Promise<GroupGalleryImage[]>
-
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 istrue
.
-
-
Promise<GroupGalleryImage[]>
: A promise that resolves to an array of gallery images.
// 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);
Update a group gallery.
Update details of a group gallery such as name, description, and permissions.
updateGroupGallery(options: {
groupId: string;
groupGalleryId: string;
name?: string;
description?: string;
membersOnly?: boolean;
roleIdsToView?: string[];
roleIdsToSubmit?: string[];
roleIdsToAutoApprove?: string[];
roleIdsToManage?: string[];
}): Promise<GroupGallery>
-
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)
-
-
-
Promise<GroupGallery>
: A promise that resolves to the updated gallery object.
// 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);
Delete a group gallery.
Delete a gallery from a group.
deleteGroupGallery(options: {
groupId: string;
groupGalleryId: string;
}): Promise<RequestSuccess>
-
options
(object):-
groupId
(string, required) -
groupGalleryId
(string, required)
-
-
Promise<RequestSuccess>
: A promise that resolves to a success object.
// 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);
Add an image to a group gallery.
Add an image to a specified gallery in a group.
addGroupGalleryImage(options: {
groupId: string;
groupGalleryId: string;
fileId: string;
}): Promise<GroupGalleryImage>
-
options
(object):-
groupId
(string, required) -
groupGalleryId
(string, required) -
fileId
(string, required):
The file ID of the image to add.
-
-
Promise<GroupGalleryImage>
: A promise that resolves to the added gallery image object.
// 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);
Delete an image from a group gallery.
Remove an image from a group gallery.
deleteGroupGalleryImage(options: {
groupId: string;
groupGalleryId: string;
groupGalleryImageId: string;
}): Promise<RequestSuccess>
-
options
(object):-
groupId
(string, required) -
groupGalleryId
(string, required) -
groupGalleryImageId
(string, required)
-
-
Promise<RequestSuccess>
: A promise that resolves to a success object.
// 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);
Get sent group invites.
Retrieve a list of users who have been invited to join the group.
getGroupInvitesSent(options: { groupId: string }): Promise<GroupMember[]>
-
options
(object):-
groupId
(string, required)
-
-
Promise<GroupMember[]>
: A promise that resolves to an array of group members who have been invited.
// Example: Get sent group invites
const invites = await vrchatApi.groupApi.getGroupInvitesSent({
groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
});
console.log(invites);
Invite a user to a group.
Send an invitation to a user to join a group.
inviteUserToGroup(options: {
groupId: string;
userId: string;
confirmOverrideBlock?: boolean;
}): Promise<boolean>
-
options
(object):-
groupId
(string, required) -
userId
(string, required) -
confirmOverrideBlock
(boolean, optional):
Whether to override a block if the user is blocking you.
-
-
Promise<boolean>
: A promise that resolves totrue
if the invitation was sent successfully.
// 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
Delete a group invite sent to a user.
Cancel an invitation sent to a user.
deleteUserInvite(options: {
groupId: string;
userId: string;
}): Promise<boolean>
-
options
(object):-
groupId
(string, required) -
userId
(string, required)
-
-
Promise<boolean>
: A promise that resolves totrue
if the invitation was canceled successfully.
// 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
Join a group.
Request to join a group or accept an invitation.
joinGroup(options: { groupId: string }): Promise<GroupMember[]>
-
options
(object):-
groupId
(string, required)
-
-
Promise<GroupMember[]>
: A promise that resolves to an array of group members (usually includes your own member object).
// Example: Join a group
const members = await vrchatApi.groupApi.joinGroup({
groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
});
console.log(members);
Leave a group.
Leave the specified group.
leaveGroup(options: { groupId: string }): Promise<boolean>
-
options
(object):-
groupId
(string, required)
-
-
Promise<boolean>
: A promise that resolves totrue
if you left the group successfully.
// Example: Leave a group
const success = await vrchatApi.groupApi.leaveGroup({
groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
});
console.log(success); // true
List members of a group.
Retrieve a list of members in a group.
listGroupMembers(options: {
groupId: string;
n?: number;
offset?: number;
sort?: 'joinedAt:asc' | 'joinedAt:desc';
roleId?: string;
}): Promise<GroupMember[]>
-
options
(object):-
groupId
(string, required) -
n
(number, optional):
Number of members to retrieve (1-100). Default is60
. -
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.
-
-
Promise<GroupMember[]>
: A promise that resolves to an array of group members.
// 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);
Get information about a group member.
Retrieve detailed information about a specific member of a group.
getGroupMember(options: {
groupId: string;
userId: string;
}): Promise<GroupMember>
-
options
(object):-
groupId
(string, required) -
userId
(string, required)
-
-
Promise<GroupMember>
: A promise that resolves to the group member object.
// 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);
Update a group member's information.
Update settings for a group member, such as visibility or subscription status.
updateGroupMember(options: {
groupId: string;
userId: string;
visibility?: 'visible' | 'hidden' | 'friends';
isSubscribedToAnnouncements?: boolean;
managerNotes?: string;
}): Promise<GroupMemberLimitedUser>
-
options
(object):-
groupId
(string, required) -
userId
(string, required) -
Other optional fields:
-
visibility
(string, optional) -
isSubscribedToAnnouncements
(boolean, optional) -
managerNotes
(string, optional)
-
-
-
Promise<GroupMemberLimitedUser>
: A promise that resolves to the limited user information.
// 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);
Kick a member from a group.
Remove a member from the group.
kickGroupMember(options: {
groupId: string;
userId: string;
}): Promise<boolean>
-
options
(object):-
groupId
(string, required) -
userId
(string, required)
-
-
Promise<boolean>
: A promise that resolves totrue
if the member was kicked successfully.
// 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
Add a role to a group member.
Assign a role to a group member.
addRoleToGroupMember(options: {
groupId: string;
userId: string;
groupRoleId: string;
}): Promise<string[]>
-
options
(object):-
groupId
(string, required) -
userId
(string, required) -
groupRoleId
(string, required)
-
-
Promise<string[]>
: A promise that resolves to an array of role IDs assigned to the user.
// 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);
Remove a role from a group member.
Remove a role assignment from a group member.
removeRoleFromGroupMember(options: {
groupId: string;
userId: string;
groupRoleId: string;
}): Promise<string[]>
-
options
(object):- Same as in
addRoleToGroupMember
- Same as in
-
Promise<string[]>
: A promise that resolves to the updated array of role IDs assigned to the user.
// 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);
List possible permissions for a group.
Retrieve a list of all available permissions that can be assigned within a group.
listGroupPermissions(options: {
groupId: string;
}): Promise<GroupPermission[]>
-
options
(object):-
groupId
(string, required)
-
-
Promise<GroupPermission[]>
: A promise that resolves to an array of group permissions.
// Example: List group permissions
const permissions = await vrchatApi.groupApi.listGroupPermissions({
groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
});
console.log(permissions);
Get join requests for a group.
Retrieve a list of users who have requested to join the group.
getGroupJoinRequests(options: {
groupId: string;
}): Promise<GroupMember[]>
-
options
(object):-
groupId
(string, required)
-
-
Promise<GroupMember[]>
: A promise that resolves to an array of group members who have requested to join.
// Example: Get group join requests
const requests = await vrchatApi.groupApi.getGroupJoinRequests({
groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
});
console.log(requests);
Cancel a join request to a group.
Cancel a pending join request to a group.
cancelGroupJoinRequest(options: {
groupId: string;
}): Promise<boolean>
-
options
(object):-
groupId
(string, required)
-
-
Promise<boolean>
: A promise that resolves totrue
if the request was canceled successfully.
// Example: Cancel a join request
const success = await vrchatApi.groupApi.cancelGroupJoinRequest({
groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
});
console.log(success); // true
Respond to a group join request.
Accept or decline a user's request to join the group.
respondGroupJoinRequest(options: {
groupId: string;
userId: string;
action: 'accept' | 'deny';
}): Promise<boolean>
-
options
(object):-
groupId
,userId
(string, required) -
action
(string, required):
Action to take. Options:'accept'
,'deny'
.
-
-
Promise<boolean>
: A promise that resolves totrue
if the action was successful.
// 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
Get roles in a group.
Retrieve all roles defined within a group.
getGroupRoles(options: {
groupId: string;
}): Promise<GroupRole[]>
-
options
(object):-
groupId
(string, required)
-
-
Promise<GroupRole[]>
: A promise that resolves to an array of group roles.
// Example: Get roles in a group
const roles = await vrchatApi.groupApi.getGroupRoles({
groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
});
console.log(roles);
Create a new role in a group.
Add a new role to the group with specified permissions.
createGroupRole(options: {
groupId: string;
name: string;
description?: string;
isSelfAssignable?: boolean;
permissions?: GroupPermissionEnum[];
}): Promise<GroupRole>
-
options
(object):-
groupId
,name
(string, required) -
Other optional fields:
-
description
(string, optional) -
isSelfAssignable
(boolean, optional) -
permissions
(array ofGroupPermissionEnum
, optional)
-
-
-
Promise<GroupRole>
: A promise that resolves to the created role object.
// 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);
Update a role in a group.
Modify an existing role's properties within a group.
updateGroupRole(options: {
groupId: string;
groupRoleId: string;
name?: string;
description?: string;
isSelfAssignable?: boolean;
permissions?: GroupPermissionEnum[];
order?: number;
}): Promise<GroupRole[]>
-
options
(object):-
groupId
,groupRoleId
(string, required) -
Other optional fields:
-
name
,description
,isSelfAssignable
,permissions
,order
-
-
-
Promise<GroupRole[]>
: A promise that resolves to an array of updated group roles.
// 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);
Delete a role from a group.
Remove a role from the group.
deleteGroupRole(options: {
groupId: string;
groupRoleId: string;
}): Promise<GroupRole[]>
-
options
(object):-
groupId
,groupRoleId
(string, required)
-
-
Promise<GroupRole[]>
: A promise that resolves to an array of remaining group roles.
// 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);
Get instances of a group.
Retrieve a list of active instances associated with a group.
getGroupInstances(options: {
groupId: string;
}): Promise<GroupInstance[]>
-
options
(object):-
groupId
(string, required)
-
-
Promise<GroupInstance[]>
: A promise that resolves to an array of group instances.
// Example: Get group instances
const instances = await vrchatApi.groupApi.getGroupInstances({
groupId: 'grp_12345678-1234-1234-1234-1234567890ab',
});
console.log(instances);
Edit a group post.
Modify an existing post within a group.
editGroupPost(options: {
groupId: string;
notificationId: string;
title?: string;
text?: string;
imageId?: string;
sendNotification?: boolean;
roleIds?: string[];
visibility?: 'group' | 'public';
}): Promise<GroupPost>
-
options
(object):-
groupId
,notificationId
(string, required) -
Other optional fields:
-
title
,text
,imageId
,sendNotification
,roleIds
,visibility
-
-
-
Promise<GroupPost>
: A promise that resolves to the edited post.
// 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.
- VRC+ Subscription: Creating groups requires a VRChat Plus subscription.
-
Deprecated Methods: The
getGroupAnnouncement
,createGroupAnnouncement
, anddeleteGroupAnnouncement
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.
-
searchGroups
: Search for groups by query. -
createGroup
: Create a new group (VRC+ required). -
getGroupByID
: Get detailed information about a specific group. -
updateGroup
: Update information about a specific group. -
deleteGroup
: Delete a group. -
getGroupPosts
: Retrieve posts from a group. -
createGroupPost
: Create a new post in a group. -
deleteGroupPost
: Delete a post from a group. -
getGroupAuditLogs
: Retrieve audit logs for a group. -
getGroupBans
: Get a list of banned users in a group. -
banGroupMember
: Ban a user from a group. -
unbanGroupMember
: Unban a user from a group. -
createGroupGallery
: Create a new gallery in a group. -
getGroupGalleryImages
: Get images from a group gallery. -
updateGroupGallery
: Update a group gallery. -
deleteGroupGallery
: Delete a group gallery. -
addGroupGalleryImage
: Add an image to a group gallery. -
deleteGroupGalleryImage
: Delete an image from a group gallery. -
getGroupInvitesSent
: Get sent group invites. -
inviteUserToGroup
: Invite a user to a group. -
deleteUserInvite
: Delete a group invite sent to a user. -
joinGroup
: Join a group. -
leaveGroup
: Leave a group. -
listGroupMembers
: List members of a group. -
getGroupMember
: Get information about a group member. -
updateGroupMember
: Update a group member's information. -
kickGroupMember
: Kick a member from a group. -
addRoleToGroupMember
: Add a role to a group member. -
removeRoleFromGroupMember
: Remove a role from a group member. -
listGroupPermissions
: List possible permissions for a group. -
getGroupJoinRequests
: Get join requests for a group. -
cancelGroupJoinRequest
: Cancel a join request to a group. -
respondGroupJoinRequest
: Respond to a group join request. -
getGroupRoles
: Get roles in a group. -
createGroupRole
: Create a new role in a group. -
updateGroupRole
: Update a role in a group. -
deleteGroupRole
: Delete a role from a group. -
getGroupInstances
: Get instances of a group. -
editGroupPost
: Edit a group post.