0
votes

I am trying to get the Url of the "current web app URL".

When I use the code:

function test(){
var $url = ScriptApp.getService().getUrl();
Logger.log($url);
}

This shows the URL which is different than the URL I see after I click on "Publish->Deploy as web app->Current web app URL".

I tried looking in the documentation, but it seems like the code is correct.

1
Have you tried publishing a new version? - TheMaster
Yes, that fixed the URL. Thanks! - Milind Pandharkame

1 Answers

1
votes

You just needed to deploy the app with a new version so the project could update the code and configuration.