VRChat.API 1.6.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package VRChat.API --version 1.6.1                
NuGet\Install-Package VRChat.API -Version 1.6.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="VRChat.API" Version="1.6.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VRChat.API --version 1.6.1                
#r "nuget: VRChat.API, 1.6.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install VRChat.API as a Cake Addin
#addin nuget:?package=VRChat.API&version=1.6.1

// Install VRChat.API as a Cake Tool
#tool nuget:?package=VRChat.API&version=1.6.1                

alternate text is missing from this package README image

VRChat API Library for C#

A C# client to interact with the unofficial VRChat API. Supports all REST calls specified in https://github.com/vrchatapi/specification.

Disclaimer

This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API.

Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:

  • We do not provide documentation or support for the API.
  • Do not make queries to the API more than once per 60 seconds.
  • Abuse of the API may result in account termination.
  • Access to API endpoints may break at any given time, with no warning.

As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it.

Installation

Install with NuGet:

# With .NET CLI
dotnet add package VRChat.API --version <LATEST_VERSION>

# Or with Package Manager
Install-Package VRChat.API -Version <LATEST_VERSION>

Getting Started

The following example code authenticates you with the API, fetches your join-date, and prints the name of a world.

using System;
using System.Diagnostics;
using System.Threading.Tasks;
using VRChat.API.Api;
using VRChat.API.Client;
using VRChat.API.Model;

namespace Example
{
    class Program
    {
        static void Main(string[] args)
        {
            MainAsync().Wait();
            Console.ReadKey();
        }

        static async Task MainAsync()
        {
            // Configure API login credentials
            Configuration config = new Configuration();
            config.Username = "username";
            config.Password = "password";

            try
            {
                // Calling "GetCurrentUser" will log you in.
                AuthenticationApi authApi = new AuthenticationApi(config);
                var user = await authApi.GetCurrentUserAsync();
                Console.WriteLine($"Logged in user {user.DisplayName}, Current Avatar {user.CurrentAvatar}");

                UsersApi userApi = new UsersApi(config);
                var getUser = await userApi.GetUserAsync(user.Id);
                Console.WriteLine($"Found user {getUser.DisplayName}, joined {getUser.DateJoined}");

                WorldsApi worldApi = new WorldsApi(config);
                var world = await worldApi.GetWorldAsync("wrld_ba913a96-fac4-4048-a062-9aa5db092812");
                Console.WriteLine($"Found world {world.Name}, visits: {world.Visits}");
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling API: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

To use the API client with a HTTP proxy, setup a System.Net.WebProxy

Configuration c = new Configuration();
System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/");
webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
c.Proxy = webProxy;

Documentation for API Endpoints

All URIs are relative to https://api.vrchat.cloud/api/1

Class Method HTTP request Description
AuthenticationApi CheckUserExists GET /auth/exists Check User Exists
AuthenticationApi DeleteUser PUT /user/{userId}/delete Delete User
AuthenticationApi GetCurrentUser GET /auth/user Login and/or Get Current User Info
AuthenticationApi Logout PUT /logout Logout
AuthenticationApi Verify2FA POST /auth/twofactorauth/totp/verify Verify 2FA code
AuthenticationApi VerifyAuthToken GET /auth Verify Auth Token
AuthenticationApi VerifyRecoveryCode POST /auth/twofactorauth/otp/verify Verify 2FA code with Recovery code
AvatarsApi CreateAvatar POST /avatars Create Avatar
AvatarsApi DeleteAvatar DELETE /avatars/{avatarId} Delete Avatar
AvatarsApi GetAvatar GET /avatars/{avatarId} Get Avatar
AvatarsApi GetFavoritedAvatars GET /avatars/favorites List Favorited Avatars
AvatarsApi SearchAvatars GET /avatars Search Avatars
AvatarsApi SelectAvatar PUT /avatars/{avatarId}/select Select Avatar
AvatarsApi SelectFallbackAvatar PUT /avatars/{avatarId}/selectFallback Select Fallback Avatar
AvatarsApi UpdateAvatar PUT /avatars/{avatarId} Update Avatar
EconomyApi GetCurrentSubscriptions GET /auth/user/subscription Get Current Subscriptions
EconomyApi GetLicenseGroup GET /licenseGroups/{licenseGroupId} Get License Group
EconomyApi GetSteamTransaction GET /Steam/transactions/{transactionId} Get Steam Transaction
EconomyApi GetSteamTransactions GET /Steam/transactions List Steam Transactions
EconomyApi GetSubscriptions GET /subscriptions List Subscriptions
FavoritesApi AddFavorite POST /favorites Add Favorite
FavoritesApi ClearFavoriteGroup DELETE /favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId} Clear Favorite Group
FavoritesApi GetFavorite GET /favorites/{favoriteId} Show Favorite
FavoritesApi GetFavoriteGroup GET /favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId} Show Favorite Group
FavoritesApi GetFavoriteGroups GET /favorite/groups List Favorite Groups
FavoritesApi GetFavorites GET /favorites List Favorites
FavoritesApi RemoveFavorite DELETE /favorites/{favoriteId} Remove Favorite
FavoritesApi UpdateFavoriteGroup PUT /favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId} Update Favorite Group
FilesApi CreateFile POST /file Create File
FilesApi CreateFileVersion POST /file/{fileId} Create File Version
FilesApi DeleteFile DELETE /file/{fileId} Delete File
FilesApi DeleteFileVersion DELETE /file/{fileId}/{versionId} Delete File Version
FilesApi DownloadFileVersion GET /file/{fileId}/{versionId} Download File Version
FilesApi FinishFileDataUpload PUT /file/{fileId}/{versionId}/{fileType}/finish Finish FileData Upload
FilesApi GetFile GET /file/{fileId} Show File
FilesApi GetFileDataUploadStatus GET /file/{fileId}/{versionId}/{fileType}/status Check FileData Upload Status
FilesApi GetFiles GET /files List Files
FilesApi StartFileDataUpload PUT /file/{fileId}/{versionId}/{fileType}/start Start FileData Upload
FriendsApi DeleteFriendRequest DELETE /user/{userId}/friendRequest Delete Friend Request
FriendsApi Friend POST /user/{userId}/friendRequest Send Friend Request
FriendsApi GetFriendStatus GET /user/{userId}/friendStatus Check Friend Status
FriendsApi GetFriends GET /auth/user/friends List Friends
FriendsApi Unfriend DELETE /auth/user/friends/{userId} Unfriend
InstancesApi GetInstance GET /instances/{worldId}:{instanceId} Get Instance
InstancesApi GetShortName GET /instances/{worldId}:{instanceId}/shortName Get Instance Short Name
InstancesApi SendSelfInvite POST /instances/{worldId}:{instanceId}/invite Send Self Invite
InviteApi GetInviteMessage GET /message/{userId}/{messageType}/{slot} Get Invite Message
InviteApi GetInviteMessages GET /message/{userId}/{messageType} List Invite Messages
InviteApi InviteUser POST /invite/{userId} Invite User
InviteApi RequestInvite POST /requestInvite/{userId} Request Invite
InviteApi ResetInviteMessage DELETE /message/{userId}/{messageType}/{slot} Reset Invite Message
InviteApi RespondInvite POST /invite/{notificationId}/response Respond Invite
InviteApi UpdateInviteMessage PUT /message/{userId}/{messageType}/{slot} Update Invite Message
NotificationsApi AcceptFriendRequest PUT /auth/user/notifications/{notificationId}/accept Accept Friend Request
NotificationsApi ClearNotifications PUT /auth/user/notifications/clear Clear All Notifications
NotificationsApi DeleteNotification PUT /auth/user/notifications/{notificationId}/hide Delete Notification
NotificationsApi GetNotifications GET /auth/user/notifications List Notifications
NotificationsApi MarkNotificationAsRead PUT /auth/user/notifications/{notificationId}/see Mark Notification As Read
PermissionsApi GetAssignedPermissions GET /auth/permissions Get Assigned Permissions
PermissionsApi GetPermission GET /permissions/{permissionId} Get Permission
PlayermoderationApi ClearAllPlayerModerations DELETE /auth/user/playermoderations Clear All Player Moderations
PlayermoderationApi DeletePlayerModeration DELETE /auth/user/playermoderations/{playerModerationId} Delete Player Moderation
PlayermoderationApi GetPlayerModeration GET /auth/user/playermoderations/{playerModerationId} Get Player Moderation
PlayermoderationApi GetPlayerModerations GET /auth/user/playermoderations Search Player Moderations
PlayermoderationApi ModerateUser POST /auth/user/playermoderations Moderate User
PlayermoderationApi UnmoderateUser PUT /auth/user/unplayermoderate Unmoderate User
SystemApi GetCSS GET /css/app.css Download CSS
SystemApi GetConfig GET /config Fetch API Config
SystemApi GetCurrentOnlineUsers GET /visits Current Online Users
SystemApi GetHealth GET /health Check API Health
SystemApi GetInfoPush GET /infoPush Show Information Notices
SystemApi GetJavaScript GET /js/app.js Download JavaScript
SystemApi GetSystemTime GET /time Current System Time
UsersApi GetUser GET /users/{userId} Get User by ID
UsersApi GetUserByName GET /users/{username}/name Get User by Username
UsersApi SearchUsers GET /users Search All Users
UsersApi UpdateUser PUT /users/{userId} Update User Info
WorldsApi CreateWorld POST /worlds Create World
WorldsApi DeleteWorld DELETE /worlds/{worldId} Delete World
WorldsApi GetActiveWorlds GET /worlds/active List Active Worlds
WorldsApi GetFavoritedWorlds GET /worlds/favorites List Favorited Worlds
WorldsApi GetRecentWorlds GET /worlds/recent List Recent Worlds
WorldsApi GetWorld GET /worlds/{worldId} Get World by ID
WorldsApi GetWorldInstance GET /worlds/{worldId}/{instanceId} Get World Instance
WorldsApi GetWorldMetadata GET /worlds/{worldId}/metadata Get World Metadata
WorldsApi GetWorldPublishStatus GET /worlds/{worldId}/publish Get World Publish Status
WorldsApi PublishWorld PUT /worlds/{worldId}/publish Publish World
WorldsApi SearchWorlds GET /worlds Search All Worlds
WorldsApi UnpublishWorld DELETE /worlds/{worldId}/publish Unpublish World
WorldsApi UpdateWorld PUT /worlds/{worldId} Update World

Documentation for Models

Contributing

Contributions are welcome, but do not add features that should be handled by the OpenAPI specification.

Join the Discord server to get in touch with us.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on VRChat.API:

Package Downloads
VRChat.API.Client

Fluent interface API around VRChat.API, allowing for fluent usage of the library in enterprise-grade environments.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.18.8 343 11/7/2024
1.18.7 65 11/7/2024
1.18.6 142 10/20/2024
1.18.5 108 10/5/2024
1.18.4 299 9/22/2024
1.18.1 608 7/22/2024
1.18.0 102 7/21/2024
1.17.6 3,995 6/13/2024
1.17.5 205 5/25/2024
1.17.4 116 5/21/2024
1.17.3 249 4/29/2024
1.17.2 155 4/23/2024
1.17.1 131 4/21/2024
1.17.0 135 4/15/2024
1.16.8 132 4/14/2024
1.16.7 169 3/22/2024
1.16.6 168 2/24/2024
1.16.5 146 2/11/2024
1.16.4 188 2/2/2024
1.16.3 116 1/26/2024
1.16.2 157 1/5/2024
1.16.0 25,833 12/30/2023
1.15.0 230 10/4/2023
1.14.0 166 9/21/2023
1.13.0 150 9/19/2023
1.12.0 21,370 5/31/2023
1.11.1 467 2/19/2023
1.11.0 287 2/11/2023
1.9.1 603 11/17/2022
1.9.0 324 11/17/2022
1.8.0 358 11/4/2022
1.7.7 436 10/16/2022
1.7.6 381 10/16/2022
1.7.4 499 9/8/2022
1.7.3 426 9/3/2022
1.7.2 520 7/6/2022
1.7.1 607 4/27/2022
1.7.0 467 4/15/2022
1.6.10 457 4/9/2022
1.6.9 550 1/27/2022
1.6.8 465 1/22/2022
1.6.7 457 1/20/2022
1.6.6 462 1/16/2022
1.6.5 348 12/19/2021
1.6.4-rc1 602 12/5/2021
1.6.3 3,367 11/26/2021
1.6.2 2,403 11/26/2021
1.6.1 2,235 11/25/2021
1.6.0 3,208 11/25/2021
1.5.3 322 11/23/2021
1.5.3-rc01 193 11/23/2021
1.0.0 328 11/23/2021

Automated deployment