Overview
User endpoints handle profile viewing, social interactions, and account settings. All endpoints require authentication unless otherwise noted.Get User Profile
Retrieve detailed information about a user by username.Request
The username of the user to retrieve
Valid session cookie
Response
The user’s display name
User record ID
User’s profile description
id: Description record IDtext: Description text contentupdated: Last update timestamp
User permission level (1-5)
Number of followers
Number of users being followed
Number of friends
True if the current user follows this user
True if this user follows the current user
True if users are friends
True if this user has sent a friend request to the current user
True if the current user has sent a friend request to this user
Array of user’s places/games:
id: Place IDname: Place namelikeCount: Number of likesdislikeCount: Number of dislikesplayerCount: Current player count
User’s posts:
id: Post IDcreated: Creation timestampcontent: Array of content versionsvisibility: Post visibility setting
Groups the user is a member of
Groups owned by the user
Errors
- 404 Not Found: User does not exist
- 302 Redirect: Not authenticated (redirects to
/login)
Site/src/routes/(main)/user/[username]/+page.server.ts:56-65
Update Profile Settings
Update the current user’s profile information.Request
Valid session cookie
Profile description (max 1000 characters)
Theme name from available themes in configuration
Response
“Profile updated successfully!”
Errors
“must be a valid theme” - Invalid theme selection
Site/src/routes/(main)/settings/+page.server.ts:42-56
Change Password
Update the current user’s password.Request
Valid session cookie
Current password for verification
New password (minimum 1 character)
Confirm new password (must match npassword)
Response
“Password updated successfully!”
Validation Errors
“Incorrect password” - Current password verification failed
“Passwords do not match” - New password and confirmation don’t match
“New password cannot be the same as the current password”
Site/src/routes/(main)/settings/+page.server.ts:57-87
Update User Styling
Set custom CSS for the user’s profile.Request
Valid session cookie
Custom CSS (max 10,000 characters)
Response
“Styling updated successfully!”
Site/src/routes/(main)/settings/+page.server.ts:107-118
Social Interactions
Manage user relationships including following, friends, and friend requests.Follow User
Username to follow
Site/src/routes/(main)/user/[username]/+page.server.ts:129-136
Unfollow User
Username to unfollow
Site/src/routes/(main)/user/[username]/+page.server.ts:137-140
Send Friend Request
Username to send friend request to
- 400 Bad Request: “Already friends” - Users are already friends
Site/src/routes/(main)/user/[username]/+page.server.ts:145-165
Cancel Friend Request
Username of pending request to cancel
Site/src/routes/(main)/user/[username]/+page.server.ts:167-170
Accept Friend Request
Username to accept friend request from
- 400 Bad Request: “No friend request to accept”
Site/src/routes/(main)/user/[username]/+page.server.ts:175-182
Decline Friend Request
Username to decline friend request from
Site/src/routes/(main)/user/[username]/+page.server.ts:171-174
Unfriend User
Username to unfriend
Site/src/routes/(main)/user/[username]/+page.server.ts:141-144
Rerender Avatar (Admin)
Request a re-render of a user’s avatar. Requires administrator privileges.Request
Username to rerender avatar for
Valid session cookie with permission level 5
Response
URL to updated body avatar with cache-busting parameter
URL to updated avatar with cache-busting parameter
Errors
- 403 Forbidden: Insufficient permissions
- 404 Not Found: User does not exist
- 500 Internal Server Error: “Failed to request render”
Site/src/routes/(main)/user/[username]/+page.server.ts:112-127