Skip to main content
GET
/
api
/
users
/
me
Get my profile
curl --request GET \
  --url https://api.example.com/api/users/me
{
  "success": true,
  "timestamp": "<string>",
  "data": {
    "id": 123,
    "email": "<string>",
    "firstName": "<string>",
    "lastName": "<string>",
    "roles": [
      {}
    ]
  }
}

Endpoint

GET /api/users/me

Authentication

Requires a valid JWT access token in the Authorization header.
Authorization: Bearer <access_token>

Response

Returns the authenticated user’s private profile including email and roles.
success
boolean
Indicates if the request was successful
timestamp
string
ISO 8601 timestamp of the response
data
object
User private profile data

Example Request

curl -X GET http://localhost:8080/api/users/me \
  -H "Authorization: Bearer <access_token>"

Example Response

{
  "success": true,
  "timestamp": "2026-03-03T10:30:00Z",
  "data": {
    "id": 1,
    "email": "[email protected]",
    "firstName": "John",
    "lastName": "Doe",
    "roles": ["MEMBER"]
  }
}

Error Responses

{
  "success": false,
  "timestamp": "2026-03-03T10:30:00Z",
  "error": "Unauthorized"
}
The access token is missing, invalid, or expired.

Source Reference

This endpoint is implemented in:
  • UserController.java:21-24

Build docs developers (and LLMs) love