pünktchen 1409 Posted March 3 Posted March 3 What is the c# equivalent of the REST API endpoint "/Sessions/Playing/Stopped", if i only have the ItemId, MediaSourceId and PlaySessionId, but no SessionId? The REST API endpoint works without a SessionId.
softworkz 5104 Posted March 6 Posted March 6 (edited) @pünktchen I had actually tried to look it up on the same day you posted, expecting that I could just let you know which steps the server is taking when responding to REST request, but it turned out that there's no easy answer, unfortunately. On 3/3/2026 at 11:17 AM, pünktchen said: i only have the ItemId, MediaSourceId and PlaySessionId, but no SessionId? On 3/3/2026 at 11:17 AM, pünktchen said: The REST API endpoint works without a SessionId. The REST API might not need a SessionId - but it still has something that a plugin doesn't have: An authorization through the token header. I haven't followed all the way through, but the rough picture is this: The request is received, code path goes somewhere deep into auth and session stuff and when it returns, it "magically" has all the information that is needed.. (a Sessionxxxx object). Maybe @Lukecan explain better.. (that' s why I didn't respond) Edited March 6 by softworkz
pünktchen 1409 Posted Friday at 08:21 PM Author Posted Friday at 08:21 PM Thanks for your research @softworkzI've already expected something like that
Luke 42143 Posted 23 hours ago Posted 23 hours ago What is the context from which this is being called? If it's called from an api service, then I can help you get the session info in the same way that our endpoint does. But if it's called from something that is entirely in the background, then your code will need to know that info.
pünktchen 1409 Posted 2 hours ago Author Posted 2 hours ago 20 hours ago, Luke said: What is the context from which this is being called? If it's called from an api service, then I can help you get the session info in the same way that our endpoint does. But if it's called from something that is entirely in the background, then your code will need to know that info. The playback session is created with an api key.
Luke 42143 Posted 1 hour ago Posted 1 hour ago Since those api_keys are not associated with a user, this is currently not supported. It's on the todo list though, that when you create an api_key, to pick the user to associate it with.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now