Created
June 17, 2021 16:51
-
-
Save JonnyWong16/618af80ccc5d4d81433cebc2d5886fd2 to your computer and use it in GitHub Desktop.
Create a new Plex.tv token for your app.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import uuid | |
from plexapi.utils import getMyPlexAccount, createMyPlexDevice | |
account = getMyPlexAccount() | |
product = input("App name: ") | |
headers = { | |
'X-Plex-Platform': '', | |
'X-Plex-Platform-Version': '', | |
'X-Plex-Provides': '', | |
'X-Plex-Version': '', | |
'X-Plex-Device': '', | |
'X-Plex-Device-Name': '', | |
'X-Plex-Product': product, | |
'X-Plex-Client-Identifier': str(uuid.uuid4()) | |
} | |
device = createMyPlexDevice(headers=headers, account=account) | |
print(device.token) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment