def METHOD_NAME(self, base_url: str = None) -> str:
    """Convert an invitation to URL format for sharing.
    Returns:
        An invite url
    """
    c_json = self.to_json()
    c_i = bytes_to_b64(c_json.encode("ascii"), urlsafe=True)
    result = urljoin(base_url or self.endpoint or "", "?c_i={}".format(c_i))
    return result