mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-06 04:20:46 +00:00
5.4 KiB
5.4 KiB
User
(User)
Overview
API Calls that perform operations with Plex Media Server Users
Available Operations
- PostSignIn - Get User SignIn Data
PostSignIn
Sign in user with username and password and return user data with Plex authentication token
Example Usage
using PlexAPI;
using PlexAPI.Models.Requests;
using PlexAPI.Models.Components;
var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman");
var res = await sdk.User.PostSignInAsync(
xPlexClientIdentifier: "Postman",
requestBody: new PostSignInRequestBody() {
Login = "username@email.com",
Password = "password123",
});
// handle response
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
XPlexClientIdentifier |
string | ➖ | The unique identifier for the client application This is used to track the client application and its usage (UUID, serial number, or other number unique per device) |
Postman |
RequestBody |
PostSignInRequestBody | ➖ | Login credentials | |
serverURL |
string | ➖ | An optional server URL to use. | http://localhost:8080 |
Response
Errors
| Error Object | Status Code | Content Type |
|---|---|---|
| PlexAPI.Models.Errors.PostSignInResponseBody | 401 | application/json |
| PlexAPI.Models.Errors.SDKException | 4xx-5xx | / |