That question is long, but here's the situation:
I have a third party app run a script that uses the Plex URL commands to update the library. Before Home, I did that without the X-Plex-Token. After Home, I successfully used the token and update my script. However, after an undetermined amount of time (around 20 days) the URL commands will stop working, even with the token. I will get a 401 Unauthorized response. Trying this command directly in the browser results in the same response. The only thing that will fix it is to open Plex directly in the browser. At first, this results in no server being found. Then if I refresh a couple times, it finds the server and the URL commands start to work again.
Keep in mind that this entire time, I am still accessing the server from my devices just fine. They seem to find the server without any problems. I cannot seem to figure out why this is happening. It's annoying because I will think something should already be listed in Plex, but my script was getting an Unauthorized response and the library never got updated. Before you suggest I turn on automatic library updating, that is just not a very good feature. It detects changes as soon as they start, rather than when they are finished, which I don't think makes sense. You end up getting multiple update library calls and it never just updates a new folder in the library, it seems to scan through every single thing again. If Plex had good auto update, I would use it.
Also: you might be wondering how am I using my Plex library without launching it in the browser regularly anyway? Well, I use Fluid which creates apps out of websites and I use that as a pseudo-Plex.app. It really works great, but I never refresh it. It's just always open, all the time. I suppose I could force it to refresh itself once a day to maybe mitigate this problem.
What could be the cause of this? I can find people who are confused about the X-Plex-Token, but I have that working just fine. I can't find anyone who has this same issue. Am I alone? Let me know; thanks!