User Management Guide
Complete guide to managing users in the Facebook Clone application.
User Registration
Register New User
POST /api/Authentication/register
{
"password": "SecurePassword123!",
"fullName": "John Doe",
"username": "johndoe"
}
User Profiles
Get User Profile
GET /api/Authentication/me // current user
GET /api/Authentication/user/{userId} // user by ID
Update Profile
POST /api/Authentication/update-profile
{
"fullName": "John Doe",
"bio": "Software developer",
"location": "San Francisco, CA",
"website": "https://johndoe.com"
}
Upload Profile Picture
POST /api/Authentication/avatar
Content-Type: multipart/form-data
{
"image": file
}
Friend Management
Send Friend Request
POST /api/Friendship/send-request
Content-Type: application/json
{ "toUserId": "user-guid", "message": "Optional message" }
Accept Friend Request
POST /api/Friendship/accept-request (body: { friendshipId })
Get Friends
GET /api/Friendship/friends?page=1&pageSize=20
Get Friend Requests
GET /api/Friendship/pending-requests
User Search
Search Users
GET /api/friends/search?q=john&limit=20
User Settings
Update Privacy Settings
POST /api/Authentication/update-about-info (or settings endpoints)
{
"profileVisibility": "friends",
"postVisibility": "friends",
"messagePrivacy": "friends"
}
Notification Preferences
PUT /api/Notification (or settings endpoints for notification preferences)
{
"emailNotifications": true,
"pushNotifications": true,
"friendRequestNotifications": true
}
Learn More
- API Reference: Users
- Authentication Guide (doc page; backend: api/Authentication)