cURL
curl --request GET \ --url https://api.example.com/api/users/{id}
{ "success": true, "timestamp": "<string>", "data": { "firstName": "<string>", "lastName": "<string>" } }
Retrieve the public profile of any user
GET /api/users/{id}
Authorization: Bearer <access_token>
Show properties
curl -X GET http://localhost:8080/api/users/5 \ -H "Authorization: Bearer <access_token>"
{ "success": true, "timestamp": "2026-03-03T10:30:00Z", "data": { "firstName": "John", "lastName": "Doe" } }
401 Unauthorized
{ "success": false, "timestamp": "2026-03-03T10:30:00Z", "error": "Unauthorized" }
404 Not Found
{ "success": false, "timestamp": "2026-03-03T10:30:00Z", "error": "User not found" }
UserController.java:31-34
UserPublicProfile.java:3-7