node-plex-api icon indicating copy to clipboard operation
node-plex-api copied to clipboard

Authentication variants

Open Zefau opened this issue 5 years ago • 2 comments

Hi there,

out of the documentation I am not sure which authentication is required for what scope.

username: plex.tv username (optional / required for PlexHome)
password: plex.tv password (optional / required for PlexHome)
managedUser: details required to perform operations as a managed PlexHome user
    name: managed user name
    pin: optional pin code for the managed user
token: plex.tv authentication token (optional)

Let's say I have setups

  1. Plex Pass using Plex Home WITHOUT using a PIN for the users.
  2. Plex Pass using Plex Home WITH PIN for (some) of the users.
  3. What other scenarios do exist?

For which of the above listed setups do I need which authentication method? Or between which ones can I choose?

Thanks, Zefau

Zefau avatar Apr 27 '19 10:04 Zefau

So, my first investigation: username and password are sufficient for GET requests. For any other request (PUT, POST, DELETE) either managedUser credentials OR a token is required.

Can anybody confirm ?

Zefau avatar May 06 '19 19:05 Zefau

Can't really confirm since I haven't tried communicating with plex since the introduction of v1.3 (ref https://github.com/phillipj/node-plex-api/issues/75), though I want to reply here anyways so you get some feedback at least.

For what it's worth, I can't remember pre v1.3 had any differences in terms of authentication related to what kinds of HTTP methods was used in a request to the API. This might have changed a lot though, so don't take my word for it.

Maybe there's some hints or valuable discussions in the PR that introduced managed users in the first place https://github.com/phillipj/node-plex-api/pull/70 or other referenced PRs.

phillipj avatar May 07 '19 10:05 phillipj