Files
plexcsharp/docs/sdks/user/README.md

5.4 KiB
Raw Blame History

User

(User)

Overview

API Calls that perform operations with Plex Media Server Users

Available Operations

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

PostSignInResponse

Errors

Error Object Status Code Content Type
PlexAPI.Models.Errors.PostSignInResponseBody 401 application/json
PlexAPI.Models.Errors.SDKException 4xx-5xx /