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

5.6 KiB
Raw Blame History

User

(User)

Overview

API Calls that perform operations with Plex Media Server Users

Available Operations

PostUsersSigninData

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.PostUsersSigninDataAsync(
    xPlexClientIdentifier: "Postman",
    requestBody: new PostUsersSigninDataRequestBody() {
    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 PostUsersSigninDataRequestBody Login credentials
serverURL string An optional server URL to use. http://localhost:8080

Response

PostUsersSigninDataResponse

Errors

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