Server Version#: plex.tv
Player Version#: 0.7.4-210621
authtoken = el_authtoken.text
dprint(__name__, 0, 'MyPlex Sign In successfull')
return (username, authtoken)
def MyPlexSignOut(authtoken):
# MyPlex web address
MyPlexHost = 'plex.tv'
MyPlexSignOutPath = '/users/sign_out.xml'
MyPlexURL = 'http://' + MyPlexHost + MyPlexSignOutPath
# create POST request
xargs = { 'X-Plex-Token': authtoken }
request = urllib2.Request(MyPlexURL, None, xargs)
request.get_method = lambda: 'POST' # turn into 'POST' - done automatically with data!=None. But we don't have data.
response = urllib2.urlopen(request).read()
dprint(__name__, 1, "====== MyPlex sign out XML ======")
Does
http://plex.tv/users/sign_out.xml
still exist?
This still exists:
http://plex.tv/users/sign_in.xml
But when trying to hit sign_out.xml it fails. Let me know please if there’s a URL change to that endpoint and I’ll go make a PR to fix it. Or can you point me to the plex.tv API spec? That way I can self-solve in the future.
Cheers
There doesn’t seem to be much in the official plex.tv API docs so I think this needs someone on the staff to help out.
Can someone answer the original question about the current state of the http://plex.tv/users/sign_out.xml endpoint please?
dane22
March 24, 2023, 12:25pm
3
It does indeed exists, and use the GET method
When said, I would instead use the following:
Login
/api/v2/users/signin endpoint with a POST
Logout
/api/v2/users/signout endpoint with a DELETE
Cheers @dane22 , I made the change and it fixed the broken logout function in PlexConnect. I’ve made a PR https://github.com/iBaa/PlexConnect/pull/615 which they will hopefully merge into the product.
1 Like
Thanks for your contribution, the fix has been applied to PlexConnect.
1 Like
system
Closed
June 24, 2023, 11:55am
6
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.