Back to Karakeep

Get current user info

docs/docs/api/get-current-user.api.mdx

0.31.01.4 KB
Original Source

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; import ParamsDetails from "@theme/ParamsDetails"; import RequestSchema from "@theme/RequestSchema"; import StatusCodes from "@theme/StatusCodes"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; import Heading from "@theme/Heading";

<Heading as={"h1"} className={"openapi__heading"} children={"Get current user info"}

</Heading>

<MethodEndpoint method={"get"} path={"/users/me"} context={"endpoint"}

</MethodEndpoint>

Retrieve profile information for the currently authenticated user, including their name, email, and avatar.

<ParamsDetails parameters={undefined}

</ParamsDetails>

<RequestSchema title={"Body"} body={undefined}

</RequestSchema>

<StatusCodes id={undefined} label={undefined} responses={{"200":{"description":"The current user's profile information.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"image":{"type":"string","nullable":true},"localUser":{"type":"boolean"}},"required":["id","localUser"]}}}},"401":{"description":"Unauthorized — the Bearer token is missing, invalid, or expired.","content":{"text/plain":{"schema":{"type":"string","example":"Unauthorized"}}}}}}

</StatusCodes>