---
title: "Get the Current User"
method: POST
path: "/api/currentUser"
tags: ["user"]
---

# Get the Current User

`POST /api/currentUser`

This function is an API endpoint that allows an authenticated user to retrieve their current user information. It is tagged with "user" for OpenAPI documentation.

## Parameters

- `request`: The request data, which includes the current user information.  <br>

## Returns

If successful, this function returns a `Json<CurrentUserResponse>` object, which includes the current user information.  <br> If the user is not authorized, this function returns a `status::Unauthorized` error.  <br>

## Errors

This function will return an error if the system is in maintenance mode, or if the user is not authorized.

## Request body

- CurrentUserRequest
  - `id` string, required
  - `uuid` string, required

## Response `200`

- CurrentUserResponse
  - `error` boolean, required
  - `name` string, required
  - `email` string, nullable
  - `admin` boolean, required

## Other responses

- `401`

## Changes

- **2024-05-22** `71c0d469fb17` — 1 info
  - added the required property `admin` to the response with the `200` status
- **2024-05-20** `b66a109db88a` — 2 info
  - api tag `user` added
  - api tag `User` removed
- **2024-05-19** `fafd43b82c78` — 1 breaking, 2 info
  - removed the required property `admin` from the response with the `200` status
  - api tag `User` added
  - api tag `user` removed

[Change history](https://skmtc.dev/nesaku/apis/sctgdesk-api-server/changes/api/currentUser/post.md)

---

[API](https://skmtc.dev/nesaku/apis/sctgdesk-api-server.md) · [All operations](https://skmtc.dev/nesaku/apis/sctgdesk-api-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nesaku/sctgdesk-api-server/revisions/b1c0e7a4434f/schema)
