Get current user
GET/users/me
The Get current user request allows you to retrieve information about the currently logged in user in ANSCER ANYA. This request does not require any additional parameters, and will return a JSON object containing information about the user, including their name, email, and role.
Request
Responses
- 200
- 401
- 403
- 500
User details
- application/json
- Schema
- Example (from schema)
Schema
_id uuid
name string
Possible values: >= 3 characters and <= 50 characters
email email
Possible values: >= 5 characters and <= 255 characters
isActive boolean
role userRoles
Possible values: [developer, admin, user]
createdBy object
The user who created this user
_id string
name string
email email
updatedBy object
The user who last updated this user
_id string
name string
email email
createdAt date-time
The date and time this user was created
updatedAt date-time
The date and time this user was last updated
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"email": "user@example.com",
"isActive": true,
"role": "developer",
"createdBy": {
"_id": "string",
"name": "string",
"email": "user@example.com"
},
"updatedBy": {
"_id": "string",
"name": "string",
"email": "user@example.com"
},
"createdAt": "2024-12-03T13:26:27.341Z",
"updatedAt": "2024-12-03T13:26:27.341Z"
}
Unauthorized.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Authentication token not provided."
}
{
"message": "Authentication token not provided."
}
Forbidden.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Access to this resource is forbidden."
}
{
"message": "Access to this resource is forbidden."
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Internal Server Error. Please try again later."
}
{
"message": "Internal Server Error. Please try again later."
}
Loading...