### Authentication Source: https://komga.org/docs/openapi/komga-api/index Komga API supports authentication via Basic Authentication or by passing an API Key in the 'X-API-Key' header. ```APIDOC ## Authentication Most endpoints require authentication. Authentication is done using either: * Basic Authentication * Passing an API Key in the `X-API-Key` header ### Security Schemes **API Key** * **Type**: apiKey * **Header Parameter Name**: X-API-Key **HTTP Basic Auth** * **Type**: http * **HTTP Authorization Scheme**: basic ``` -------------------------------- ### Session Management Source: https://komga.org/docs/openapi/komga-api/index Upon successful authentication, a session is created. Sessions can be managed via cookies or custom headers. ```APIDOC ## Sessions Upon successful authentication, a session is created, and can be reused. * By default, a `KOMGA-SESSION` cookie is set via `Set-Cookie` response header. This works well for browsers and clients that can handle cookies. * If you specify a header `X-Auth-Token` during authentication, the session ID will be returned via this same header. You can then pass that header again for subsequent requests to reuse the session. If you need to set the session cookie later on, you can call `/api/v1/login/set-cookie` with `X-Auth-Token`. The response will contain the `Set-Cookie` header. ``` -------------------------------- ### Remember Me Functionality Source: https://komga.org/docs/openapi/komga-api/index Enables automatic login by setting a persistent cookie during authentication. ```APIDOC ## Remember Me During authentication, if a request parameter `remember-me` is passed and set to `true`, the server will also return a `komga-remember-me` cookie. This cookie will be used to login automatically even if the session has expired. ``` -------------------------------- ### Logout Source: https://komga.org/docs/openapi/komga-api/index Allows explicit logout of an existing session. ```APIDOC ## Logout You can explicitly logout an existing session by calling `/api/logout`. This would return a `204`. ``` -------------------------------- ### Deprecation Notice Source: https://komga.org/docs/openapi/komga-api/index Information regarding the deprecation of API endpoints. ```APIDOC ## Deprecation API endpoints marked as deprecated will be removed in the next major version. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.