Return the current playing media and it's position

I feel like I’ve seen this before, but I can’t find it anywhere.

I’m trying to just write a piece of code that will connect to my Plex Server, determine what is currently being watched, and then return the playback position. Like, 3 minutes 20 seconds into a movie. Seems like it should be simple. Anyone know how to do this?

you can GET /status/sessions with an X-Plex-Token. Which gets you a container with active media. The viewOffset property of those objects is the current playback time in milliseconds.

thanks, much appreciated. do you happen to have a link to more information about that somewhere? Is there any plex api documentation? I haven’t been having much luck finding it. nevermind! figured it out.