Permissions API (Draft WIP) - lolmaxz/vrc-ts GitHub Wiki
The Permissions API allows you to retrieve information about the permissions granted to your VRChat account. Permissions are typically assigned through actions such as subscribing to VRChat Plus (VRC+). This API provides methods to list all your assigned permissions and to get details about a specific permission.
-
getAssignedPermissions
- Retrieve all permissions currently granted to your account. -
getPermission
- Retrieve details about a specific permission.
Retrieve all permissions currently granted to your account.
Returns a list of all permissions currently granted to your user. Permissions are assigned through various means, such as subscribing to VRC+.
getAssignedPermissions(): Promise<Permission[]>
- No parameters
-
Promise<Permission[]>
: A promise that resolves to an array ofPermission
objects representing the permissions assigned to your account.
// Example: Retrieve all assigned permissions
const permissions = await vrchatApi.permissionsApi.getAssignedPermissions();
console.log(permissions);
Retrieve details about a specific permission.
Returns details about a specific permission by its permission ID. Note that this endpoint returns the same information as getAssignedPermissions
, but for a single permission.
getPermission(options: {
permissionId: string;
}): Promise<Permission>
-
options
(object):-
permissionId
(string, required):
The ID of the permission to retrieve.
-
-
Promise<Permission>
: A promise that resolves to aPermission
object containing details about the specified permission.
// Example: Retrieve details about a specific permission
const permission = await vrchatApi.permissionsApi.getPermission({
permissionId: 'perm_abcdef12-3456-7890-abcd-ef1234567890',
});
console.log(permission);
type Permission = {
id: string; // PermissionIdType
ownerId: string; // UserIdType
ownerDisplayName?: string;
name: string;
displayName?: string;
type?: string;
data?: {
maxFavoritesPerGroup?: {
avatar?: number;
};
maxFavoriteGroups?: {
avatar?: number;
};
tags: string[];
};
};
-
getAssignedPermissions
- Retrieve all permissions currently granted to your account. -
getPermission
- Retrieve details about a specific permission.