From aad6df4127b9c51ada734b7559d5e55c18b4ac7c Mon Sep 17 00:00:00 2001 From: Sarmad Wahab Date: Wed, 16 Sep 2026 12:47:08 -0500 Subject: [PATCH] fix(examples): read profile fields through getPublicProfile Specification v1.21.0 moved bio, bioLinks, badges and the current-avatar fields off CurrentUser and User (only CurrentUser keeps currentAvatar*). They are now served by getPublicProfile, which also gained asSelf for the owner's own view. The AspNetCore example still read them off the user objects, so every repository_dispatch build since that release failed with CS1061 in HomeController. Fetch the public profile alongside the user in both endpoints instead. Co-Authored-By: Claude Fable 5.1 --- .../Controllers/HomeController.cs | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/examples/VRChat.API.Examples.AspNetCore/Controllers/HomeController.cs b/examples/VRChat.API.Examples.AspNetCore/Controllers/HomeController.cs index 2ee0ce7a..6d5f2bee 100644 --- a/examples/VRChat.API.Examples.AspNetCore/Controllers/HomeController.cs +++ b/examples/VRChat.API.Examples.AspNetCore/Controllers/HomeController.cs @@ -25,14 +25,18 @@ public async Task GetCurrentUserAsync() { var user = await _vrchat.Authentication.GetCurrentUserAsync(); + // Profile fields (bio, bio links, badges, ...) are no longer part of CurrentUser. + // They live behind getPublicProfile; asSelf includes the owner-only view. + var profile = await _vrchat.Users.GetPublicProfileAsync(user.Id, asSelf: true); + return Ok(new { user.Id, user.DisplayName, user.CurrentAvatarImageUrl, - user.Badges, - user.Bio, - user.BioLinks, + profile.Badges, + profile.Bio, + profile.BioLinks, user.Tags }); } @@ -43,14 +47,18 @@ public async Task GetUserByIdAsync(string id) { var user = await _vrchat.Users.GetUserAsync(id); + // User no longer carries the profile or current-avatar fields; fetch them from the + // public profile instead. + var profile = await _vrchat.Users.GetPublicProfileAsync(id); + return Ok(new { user.Id, user.DisplayName, - user.CurrentAvatarImageUrl, - user.Badges, - user.Bio, - user.BioLinks, + profile.CurrentAvatarImageUrl, + profile.Badges, + profile.Bio, + profile.BioLinks, user.Tags }); }