Accounts Application

This document describes the API endpoints for managing user accounts.

Base URL: /

Authentication:

Most API calls require authorization with a valid access token. You can obtain an access token by logging in with a username and password.

Login

{ "username": "string", "password": "string" }
{ "access_token": "string" }

Register

{ "full_name": "string", "email": "string", "username": "string", "password": "string" }
{ "message": "string", // Success message "access_token": "string" }

Get Current User Info

{ "success": true, "user": { "full_name": "string", "username": "string", "email": "string", "bio": "null|string", "profile_image": "null|string", "following_count": integer, "follower_count": integer, "is_follow": boolean, "is_verify": boolean } }

Get Followers

{ "success": true, "followerUsers": [ # List of follower users account info. ] }

Get Following

{ "success": true, "followingUsers": [ { # List of following users account info. } ] }

Get User Info by Username

{ "success": true, "user": { "full_name": "string", "username": "string", "bio": "null|string", "profile_image": "null|string", "following_count": integer, "follower_count": integer, "is_follow": boolean, "is_verify": boolean } }

Follow User

{ "message": "You have followed/unfollow <username>." (depending on action) }

Change Password

{ "old_password": "string", "new_password": "string" }
{ "message": "string" // Success message }

Update Profile

{ "full_name": "string", "email": "string", "username": "string", "profile_image": file (optional) }