Open
Description
Hello,
I'm trying to use plex-api to access my plex server which uses 2FA (2 factor authentication - Plex docs).
Here is my client constructor
const client = new PlexAPI({
hostname: '192.168.1.100',
port: 32400,
username: 'my-username',
password: 'my-password',
managedUser: {
name: 'managed-name'
}
});
But I keep receiving this error:
Could not connect to server Error: Authentication failed, reason: Invalid status code in authentication response from Plex.tv, expected 201 but got 401
at C:\.....\node_modules\plex-api\lib\api.js:243:31
As mentioned on some topics I found online, I added my 2FA code at the end of the password and it worked, but since it changes every minutes, it's not a viable solution.
When turning off 2FA, it simply works.
Is there something I'm missing ? Should I use another solution such as token authentication ?
Thanks,
Metadata
Metadata
Assignees
Labels
No labels