You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to accept my plex servers invite on users behalf, I can currently do this with python-plexapi using acceptInvite.
And call it like this to accept users invite
def accept_plex_invitation(token: str, server_api_key: Optional[str] = None, server_url: Optional[str] = None):
"""Accept a Plex invitation
:param token: The token of the invitation
:type token: str
:param server_api_key: The API key of the Plex server
:type server_api_key: Optional[str] - If not provided, will get from database.
:param server_url: The URL of the Plex server
:type server_url: Optional[str] - If not provided, will get from database.
:return: None
"""
# Get the PlexServer object
plex = get_plex_server(server_api_key=server_api_key, server_url=server_url)
# Get my account from Plex and email
my_account = plex.myPlexAccount()
# Get plex account for the user
plex_account = MyPlexAccount(token=token)
# Accept the invitation and enable sync
plex_account.acceptInvite(my_account.email)
plex_account.enableViewStateSync()****
The text was updated successfully, but these errors were encountered:
I would like to accept my plex servers invite on users behalf, I can currently do this with python-plexapi using acceptInvite.
And call it like this to accept users invite
The text was updated successfully, but these errors were encountered: