def METHOD_NAME(options):
    if not (options.account):
        console(
            'You must specify an account (local identifier) so we know where to save your access token!'
        )
        return
    try:
        db.get_access_token(options.account, options.pin, re_auth=True, called_from_cli=True)
        console('Successfully authorized Flexget app on Trakt.tv. Enjoy!')
        return
    except plugin.PluginError as e:
        console('Authorization failed: %s' % e)