import configparser


def load_authtoken(filename):
    """Reads authorization token from a file.
    
    Args:
        filename (str): path to the file
    
    Returns:
        str: Top secret webhook token 
    """
    config = configparser.ConfigParser()
    if len(config.read(filename)) == 0:
        raise IOError("Could not read config file {}.".format(filename))

    token = config['github']['token']
    return token