def read_token(args):
    """ Read a token file or token parameter and return the content """
    if args.token_file:
        with open(args.token_file, encoding='utf8') as file_obj:
            token = file_obj.readline().strip()
    elif args.token:
        token = args.token
    else:
        token = None
    return token