private function build_share_url() {
        // Out_omit_querystring() in combination with ocsendpoint->get_path() is not used since both function include
        // /ocs/v1.php.
        $shareurl = $this->ocsendpoint->get_scheme() . '://' . $this->ocsendpoint->get_host() . ':' .
            $this->ocsendpoint->get_port() . $this->ocsendpoint->get_path() . '/{share_id}?' .
            $this->ocsendpoint->get_query_string(false);
        return $shareurl;
    }