neko/webpage/docs/api/whoami.api.mdx
2025-02-18 22:44:48 +01:00

63 lines
No EOL
5.5 KiB
Text

---
id: whoami
title: "Get Current User"
description: "Retrieve information about the current user session."
sidebar_label: "Get Current User"
hide_title: true
hide_table_of_contents: true
api: eJzVWE1z4zYS/StdmKrULouilJk96ebVKIlrPjJlOZuDx+WCyBaJEQhw0KA8Wpf++1YDJEXLno0ryiUnywTwXvdDf5EPwsuSxPxG5K1zaPyEkEhZI25TUSDlTjWe/52LK/RO4Q5BmY11teTHINe29eArhO48tIQOOpBMpMI26MLey0LMxX1lZa1EKhxSYw0hifmDeD2b8Z/HfIsx4JjTdYYUQG2eI9Gm1XrPXLk1Ho1nLNk0WuXhwPQLMeCDoLzCWvIvv29QzIVdf8Hci1Q0js30KpqjitEe8k6ZUpyqcV0htEZ9bRFUgcarjUIHdhO0GNw/pMLbLZqX4XXHIBxJwRq9B7WB3NqtQpCtr5goOgWKoFAk1xqLwNM4u1Ean+rIyN3iIxk7W1le1u7bpI+EGus1OuII+P86GVnjyzzjnT1hhA82K7qTRa3G8qyt1SjNE5RLU7DnSKzIEYZlkAYCSoDMpbnTtjwLM5cGtC1hBJlbY1iC80A7lAH1Xvq8OhMzYAyIlaVzjWSIAY8q6fCuxkLJM2EDEgSkAV2G9L3LtWrWVrriTIoIF6tRDxm4CE1Bd8rI3Ksd3uWtI+vOIAt40ONBxDtqhnjKReeKh3hKRzHrdVsqQ8/VNFkUiqGl/jTKWu9aPGW+GHZCxANC75UpmYNLmPJcWMSHYNCnrtCwrl7671Scvh2ELU/q4h9VFkV9xuGfCorYMwgGkL7chGzhKnUGaI/xWJxV9G0VJHlm4a30UhwOvPKv2Y/Pi+bwa4vkw1/lkCLl48L/F/a5Golk+YIS/ha9VBoLQOesg+7cY/+XvPShQ+z9fPO8n4Ruhw5aU6Ajb20R9O28T2HdsgSblpDA2+C/deq/CMr/bbw/pKJGX1keekoM7NJXYi6mslHTYQyKSnDbPdXpvc2l7pQSqWidFnNRed/Mp1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v0uEwC9s3nKk9SdFKrTK0RAeX6PFRSPzCuF1qPSP2v39/X0mw2pmXTntjtL0/eVi+XG1nLzOZlnlax0aSmPJ19KMgH9GD/3HFA7900bycJyo/uxHnq57evzmp42WynB/DT48dHPPDbdWkfYfgG5TEV9Vb8TDw1oS/ub04cCPY8+d39ymYied4g8ccWQRFcoCXRhwtrhnxfIcGx6tdlK3sXufjIM81wxj2M/La3E4/A/F0J2+
sidebar_class_name: "get api-method"
info_path: docs/api/neko-api
custom_edit_url: null
---
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"}
>
</Heading>
<MethodEndpoint
method={"get"}
path={"/api/whoami"}
context={"endpoint"}
>
</MethodEndpoint>
Retrieve information about the current user session.
<ParamsDetails
parameters={undefined}
>
</ParamsDetails>
<RequestSchema
title={"Body"}
body={undefined}
>
</RequestSchema>
<StatusCodes
id={undefined}
label={undefined}
responses={{"200":{"description":"Current user information retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the session."},"token":{"type":"string","description":"The session token, only if cookie authentication is disabled."},"profile":{"description":"The profile information of the user.","x-tags":["members"],"type":"object","properties":{"name":{"type":"string","description":"The name of the member."},"is_admin":{"type":"boolean","description":"Indicates if the member is an admin."},"can_login":{"type":"boolean","description":"Indicates if the member can log in."},"can_connect":{"type":"boolean","description":"Indicates if the member can connect."},"can_watch":{"type":"boolean","description":"Indicates if the member can watch."},"can_host":{"type":"boolean","description":"Indicates if the member can host."},"can_share_media":{"type":"boolean","description":"Indicates if the member can share media."},"can_access_clipboard":{"type":"boolean","description":"Indicates if the member can access the clipboard."},"sends_inactive_cursor":{"type":"boolean","description":"Indicates if the member sends inactive cursor."},"can_see_inactive_cursors":{"type":"boolean","description":"Indicates if the member can see inactive cursors."},"plugins":{"type":"object","additionalProperties":true,"description":"Additional plugin settings."}},"title":"MemberProfile"},"state":{"description":"The current state of the session.","type":"object","properties":{"is_connected":{"type":"boolean","description":"Indicates if the user is connected."},"is_watching":{"type":"boolean","description":"Indicates if the user is watching."}},"title":"SessionState"}},"title":"SessionData"}}}},"401":{"description":"The request requires user authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Detailed error message."}},"title":"ErrorMessage"}}}},"403":{"description":"The server understood the request, but refuses to authorize it.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Detailed error message."}},"title":"ErrorMessage"}}}}}}
>
</StatusCodes>