I’m working on a project that is powerhsell based, and attempting to reverse engineer the plex APIs, but I can’t seem to get viewcount to show with a unique X-Plex-Client-Identifier or with a new authtoken from signin.json. If I used my client id and auth token from plex web it outputs the view/play status fields just fine. Any thoughts?
Query a server endpoint using home user authToken – https://myserver:32400/library/sections/5/all?type=4
Object returned includes an array of “video” objects that do not include “viewCount”.
(If I use the user’s token from plex web on the same query, the video array provides “viewCount” for each item.)
Thanks. Not looking for playcount for all users, just one user at a time. The issue is that the fields don’t appear in the returned object for the user whose token I’ve sent, and I’m not clear why.
Prefer to go the API approach if I can avoid an export. It would be easy enough for me to grab this from the database directly as well, but would prefer to do it completely remote without a file or db.