Возвращает URL-адрес веб-приложения, если оно было развернуто; в противном случае возвращает null . Если вы используете веб-приложение в режиме разработки, возвращается URL-адрес режима разработки.
// Mail the URL of the published web app.MailApp.sendMail('myself@example.com','My Snazzy App',`My new app is now available at ${ScriptApp.getService().getUrl()}`,);
Возвращаться
String — URL-адрес веб-приложения.
is Enabled()
Возвращает true если скрипт доступен как веб-приложение.
Возвращаться
Boolean — true , если скрипт опубликован как веб-приложение; false если нет
Устаревшие методы
disable()
Устарело. Эта функция устарела и не должна использоваться в новых скриптах.
Отключает доступ к сценарию как веб-приложению. Этот метод эквивалентен открытию диалогового окна «Опубликовать > Развертывание как веб-приложение» и нажатию кнопки «Отключить веб-приложение».
[[["Прост для понимания","easyToUnderstand","thumb-up"],["Помог мне решить мою проблему","solvedMyProblem","thumb-up"],["Другое","otherUp","thumb-up"]],[["Отсутствует нужная мне информация","missingTheInformationINeed","thumb-down"],["Слишком сложен/слишком много шагов","tooComplicatedTooManySteps","thumb-down"],["Устарел","outOfDate","thumb-down"],["Проблема с переводом текста","translationIssue","thumb-down"],["Проблемы образцов/кода","samplesCodeIssue","thumb-down"],["Другое","otherDown","thumb-down"]],["Последнее обновление: 2025-07-24 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eScriptApp\u003c/code\u003e service allows you to control and interact with the deployment of your script as a web application.\u003c/p\u003e\n"],["\u003cp\u003eYou can retrieve the web app's URL using \u003ccode\u003egetUrl()\u003c/code\u003e, check its accessibility status with \u003ccode\u003eisEnabled()\u003c/code\u003e, and previously, disable it using the now deprecated \u003ccode\u003edisable()\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edisable()\u003c/code\u003e method has been deprecated and should no longer be used in new scripts, replaced by the "Publish > Deploy as web app" dialog for disabling.\u003c/p\u003e\n"],["\u003cp\u003eWhen deploying your script as a web app, you can use provided methods to obtain its URL and determine if it's enabled for access.\u003c/p\u003e\n"]]],[],null,[]]