var username = ...var password = ...var url = ...var options = { headers: { "Authorization": "Basic " + Utilities.base64Encode(username + ":" + password) }};var response = UrlFetchApp.fetch(url, options);Logger.log(response.getContentText());
The following fail with Login information disallowed
.
UrlFetchApp.fetch('https://USERNAME:[email protected]/do_something')