GET /api/auth/profile
Retrieves the profile information for the currently authenticated user.Authentication
Requires valid authentication. The user ID is extracted from the JWT access token in the request.Request Body
No request body required.Response
The user’s profile information.
Unique user identifier.
User’s email address.
User’s username.
User’s role (“user” or “admin”).
User’s TRON wallet address.
ISO 8601 timestamp of when the account was created.
ISO 8601 timestamp of the user’s last login.
Example Request
Example Response
Error Responses
Error message describing what went wrong.
401 Unauthorized
- Missing or invalid access token
404 Not Found
- User not found - The user ID from the token doesn’t match any existing user
500 Internal Server Error
- Server error with error message details
Notes
- This endpoint requires authentication middleware to populate
req.user.id(see~/workspace/source/src/api/auth/getProfile.js:5) - The wallet address returned is only the public address, not the private key
- Password information is never returned in the response
- Sensitive fields like
twoFactorSecretandwallet.privateKeyare excluded from the response - The
lastLoginfield may benullif the user has never logged in (only registered)