Skip to content

Users

Methods

GetUser(ctx, userId)

Fetch a user's public profile by ID.

go
user, err := client.GetUser(ctx, "usr_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")

Returns: (*shared.User, error)


GetUserByName(ctx, username)

Fetch a user's profile by display name.

go
user, err := client.GetUserByName(ctx, "vrchat-username")

SearchUsers(ctx, opts)

Search for users by keyword.

go
users, err := client.SearchUsers(ctx, shared.SearchUsersOptions{
    Search: "some-name",
    N:      10,
    Offset: 0,
})

SearchUsersOptions Fields

FieldTypeDescription
SearchstringSearch keyword
NintNumber of results (max 100)
OffsetintPagination offset

Returns: ([]shared.User, error)


UpdateUser(ctx, userId, req)

Update a user's profile. Can only update your own user ID.

go
updated, err := client.UpdateUser(ctx, "usr_...", shared.UpdateUserRequest{
    Bio:               "New bio text",
    StatusDescription: "Playing VRChat",
})

GetUserGroups(ctx, userId)

List all groups a user belongs to.

go
groups, err := client.GetUserGroups(ctx, "usr_...")

GetUserRepresentedGroup(ctx, userId)

Get the group a user has set as their represented group.

go
group, err := client.GetUserRepresentedGroup(ctx, "usr_...")

Type Reference

shared.User

FieldTypeDescription
IDstringUser ID
DisplayNamestringDisplay name
UsernamestringUsername
BiostringProfile bio
StatusstringStatus (active, join me, ask me, busy)
StatusDescriptionstringCustom status message
IsFriendboolWhether this user is your friend
Tags[]stringUser tags

Released under the Apache-2.0 License.