Endpoint
Authentication
This endpoint requires authentication. Include a valid JWT token in the request headers.Request Headers
Bearer token obtained from login or Google authenticationFormat:
Bearer <token>JWT token (without “Bearer” prefix)
Response
Always
true for successful requestsUser profile information
Example Request
cURL
JavaScript
Example Response
Success Response
200 OK
Error Responses
Missing Token
401 Unauthorized
Invalid Token
401 Unauthorized
Expired Token
401 Unauthorized
User Not Found
404 Not Found
Use Cases
- Profile Display: Fetch user information to display in the UI
- Session Validation: Verify user is still authenticated
- User Context: Get user details for personalized features
- Account Settings: Pre-populate forms with current user data
Notes
This endpoint uses the same authentication middleware as
/api/verify-token but returns more detailed user information including profile picture and OAuth status.Related Endpoints
- Verify Token - Validate token without full profile data
- Google Login - Initial authentication that returns user profile
- Login - Standard login that returns JWT token