or you can do it a super easy way and not even have to go through a URL, just install Tautulli and have it fetch the token for you, after setup and it identifies your server go into Settings>Plex Media Server scroll all the way down to plex.tv account token, click ‘fetch token’ copy/paste.
I’ve successfully got a login token. However, not all things seem to work with it. When I try to list playlists I get an empty array. If I replace the token with one aquired by the plex web ui it works, however. Most other things work with the token I’ve aquired too.
I can reproduce this in insomnia just fine without any coding when I do what I did in the app
When I then make a request to <server_url>/playlists it returns an empty array. The server is in my local network and I’m using the local address with http so http://192.168.1.x:32400/playlists
Anybody got an idea on why that might be? Most other things work just fine. Like listing library contents.
I also tried the python api for plex, which Ive more or less used as a documentation. The app I’m writing is actually an android app written in kotlin. Same thing when I give it my user credentials it aquires a token that makes it work. When I use one that was created by my app or insomnia it does also return an empty array for playlists.
Oh, wow I just changed X-Plex-Client-Identifier to an actual UUID and now it works… who would have thought. I assumed my app name for the time being (in developement) is unique enough on my Server. The behaviour is still weird. Everything seems to work until some things don’t and there is no indication on why that might be when using the API.
I’m assuming it having to be an unique value for a client means it needs to be generated on first app start for every individual user and stored somewhere? Appears this should be unique for the app not the user using the app, judging by solutions above.