Skip to content

Commit

Permalink
Merge pull request #615 from ActionAnalytics/update_plex_tv_logout_api
Browse files Browse the repository at this point in the history
FIxed logout now works again
  • Loading branch information
moodyblue authored Mar 26, 2023
2 parents 83a8b16 + 6f20ac4 commit 4a7fef5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PlexAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,13 +725,13 @@ def MyPlexSignIn(username, password, options):
def MyPlexSignOut(authtoken):
# MyPlex web address
MyPlexHost = 'plex.tv'
MyPlexSignOutPath = '/users/sign_out.xml'
MyPlexSignOutPath = '/api/v2/users/signout'
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.
request.get_method = lambda: 'DELETE' # turn into 'DELETE' - done automatically with data!=None. But we don't have data.

response = urllib2.urlopen(request).read()

Expand Down

0 comments on commit 4a7fef5

Please sign in to comment.