---
id: login
title: "User Login"
description: "Authenticate a user and start a new session."
sidebar_label: "User Login"
hide_title: true
hide_table_of_contents: true
api: eJzVWFtz27YS/is7yEznHA4luUmf9OYq6tQT5zKWe/KQeDwQuSIRgQCDBe2oHv33M7sgJVl2U7fuS/1gScTi2wv28oF3KuqK1PSTKroQ0MURIZHxTl3lqkQqgmkj/5yq0y7W6KIpdETQ0BEG0K4EijpE0ODwFvrNY5Ur32LQvPWsVFNlfWWcyhVh0QUTN2r66SpXAan1jpDU9E69PDnhj/tKfxMtB5pLoK4okGjVWbthRYV3EV3kvbptLUsZ7yZfiAHuFBU1Npq/xU2Laqr88gsWUeWqDWxjNEm9KQ9kKAbjKnUcgssaoXPma4dgSrZoZTCAX0Gsce/7NlfRr9E9Da/fBrIlB+/sBswKCu/XBg9dZyFDUBrSS4ul6GmDXxmLD+PGyP0iGLfyoUkAva18eBy7b6Ph+BtslhiIj/37cXK6wad5xpKDwgQvNhu61mVjDsOz9N6idg9Qzlwph04ckT0Mh0E7EBSBLLS7Thn29zEL7cD6Cg4gC+8ch+B5oD3KDvVWx6J+JqZg7BBrT881kiF2eFTrgNcNlkY/E1aQQJB26FrK97qwpl16Hcpnqkhw8nQHKboIXUnXxukimhu8LrpAPjxDmeDBgAcJbx8zxGNd9NzgIR6ro1T1tquMo8d6mi5Lw9Dafjio2hg6fNDOd5KQ8IAwRuMq1sEtzERuLOqtGPShbzQc16jjH3ScfoaAiDzoi3/WWQwNFYd/KylkIhmCHcjQbqRauEs9A3TAuB+cRfJtISF5ZOG1jlptt7zy08mPjwct4NcOKcqnCUj9ZL3X+P/BOdcgka6e0MJfY9TGYgkYgg/Q77vv/5yX3vaIg5+vHveTMNxggM6VGCh6X0p8e+9zWHYcglVHSBC9+O+D+R3BxH+N91umNOLPz77csJJ/yGxOiacP3kH6/rTnxqGJbn14ItMZpI9gHmb5uYzenfsmcP1yz9nmqsFYe2aALQ8pNiHWaqomujWTPSnkzGAacpw3577Qts8clasuWDVVdYztdDKxvM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UFOsL9ewV12uqiRngpnf7evL+9vR1rWR37UE36rTQ5P5vN3y3mo5fjk3EdGyszidlGo90BsKT7ec847o2QA5b2V19y9SM34rc4aa1mFtRbfdcznU88j9lT0XyVq3RZ/6Tu7paa8Ldgt1t+nOa0vBW70cHwKx7+tc1VjbrEIORojRs1VbNk7eiSlbO47dLcP+KX23zYcVoU2Mbvyl4dULUP7xeXKlfLnsM2vuQ9Qd+qXP5PlbzfkwRjAXl2p6x2VSfkWiVM/vs/+FAblw==
sidebar_class_name: "post 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={"User Login"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/api/login"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Authenticate a user and start a new session.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={undefined}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string","description":"The username of the user."},"password":{"type":"string","description":"The password of the user."}},"title":"SessionLogin"}}},"required":true}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"User authenticated 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>


      