def FinalizeTransferUrl(self, url):
        """Modify the url for a given transfer, based on auth and version."""
        url_builder = _UrlBuilder.FromUrl(url)
        if self.global_params.key:
            url_builder.query_params['key'] = self.global_params.key
        return url_builder.url