'Get the user\'s Plex token used for PlexPy.
Required parameters:
username (str):     The Plex.tv username
password (str):     The Plex.tv password
Optional parameters:
None
Returns:
string:             The Plex token used for PlexPy'

@cherrypy.expose
@cherrypy.tools.json_out()
@requireAuth(member_of('admin'))
@addtoapi()
def get_pms_token(self, username=None, password=None, **kwargs):

    if ((not username) and (not password)):
        return None
    plex_tv = plextv.PlexTV(username=username, password=password)
    result = plex_tv.get_token()
    if result:
        return result['auth_token']
    else:
        logger.warn(u'Unable    to    retrieve    Plex.tv    token.')
        return None
