API to mark watched/unwatched

Hello,

 

I am trying to create a Python script that will connect to myplex and then to a specific PMS in order to mark specific episodes as watched or unwatched.

 

I've learned that apparently horrible at programming, so I'm sure I'm making this extra difficult... I've been able to log in to myPlex, retrieve my myPlex Token, identify the PMS and appropriate server token, and then retrieve the list of recentlyViewed episodes. I can't seem to figure out the appropriate way to actually mark one of those episodes as unwatched or any other episode as watched.

 

I found the RasPlex project and the Plex Trackt Scrobbler, but I can't seem to figure out how they are accomplishing this. I've built this URL:

 

[PMS IP]:32400/:/unscrobble&identifier=com.plexapp.plugins.library&ratingKey=54098?X-Plex-Token=[server token]

 

 

 

I just get a 401 Unauthorized error whenever I try this. I've tried various other combinations to no avail. Am I on the right track here? Am I doing this completely wrong?

 

Any suggestions?

 

Thanks!
 

A bit of a guess, but the use of ? and & to build the URL is incorrect:

[PMS IP]:32400/:/unscrobble&identifier=com.plexapp.plugins.library&ratingKey=54098?X-Plex-Token=[server token]
---------------------------^
----------------------------------------------------------------------------------^

Should be:

[PMS IP]:32400/:/unscrobble?identifier=com.plexapp.plugins.library&ratingKey=54098&X-Plex-Token=[server token]

Whoa! You are right. That worked, and now I can mark watched/unwatched. Thanks!

Side note, is there a list of other API commands that I can use? Besides scrobble and unscrobble? 

Thanks again!

Use Plex/Web and Chrome with developer tools enabled. You can see each calls that are being made and that will help you identify what can be done or not.

Awesome. I hadn't thought about that. Thanks!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.