Enum AuthorizationStatus
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
YetkilendirmeDurumu
Bir komut dosyasının yetkilendirme durumunu belirten bir listeleme.
Bir enum'u çağırmak için üst sınıfını, adını ve özelliğini çağırırsınız. Örneğin,
ScriptApp.AuthorizationStatus.REQUIRED
.
Özellikler
Mülk | Tür | Açıklama |
REQUIRED | Enum | Kullanıcının bir veya daha fazla hizmeti kullanabilmesi için bu komut dosyasını yetkilendirmesi gerekir. Çoğu durumda komut dosyası, bir sonraki çalıştırıldığında kullanıcıdan yetkilendirme isteğinde bulunur. Ancak komut dosyası, yüklenebilir tetikleyiciler kullanan bir eklenti olarak yayınlanmışsa tetikleyici, komut dosyasını yetkilendirme isteğinde bulunmadan çalıştırır ancak komut dosyası yetkisiz hizmeti çağırmaya çalışırsa bir istisna oluşturur. |
NOT_REQUIRED | Enum | Kullanıcı, bu komut dosyasına şu anda ihtiyaç duyduğu tüm yetkileri verdi. |
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-26 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-26 UTC."],[[["\u003cp\u003eAuthorizationStatus is an enumeration used to represent the authorization level of a script.\u003c/p\u003e\n"],["\u003cp\u003eScripts may require user authorization to access certain services, indicated by \u003ccode\u003eScriptApp.AuthorizationStatus.REQUIRED\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIf a script has all necessary authorizations, its status is represented by \u003ccode\u003eScriptApp.AuthorizationStatus.NOT_REQUIRED\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAdd-ons using installable triggers might run without explicit authorization prompts but will throw exceptions when attempting to use unauthorized services.\u003c/p\u003e\n"]]],[],null,["# Enum AuthorizationStatus\n\nAuthorizationStatus\n\nAn enumeration denoting the authorization status of a script.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nScriptApp.AuthorizationStatus.REQUIRED`. \n\n### Properties\n\n| Property | Type | Description |\n|----------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `REQUIRED` | `Enum` | The user needs to authorize this script to use one or more services. In most cases, the script prompts the user for authorization the next time it runs; however, if the script is published as an [add-on](/gsuite/add-ons/overview) that uses [installable triggers](/apps-script/understanding_triggers), the trigger runs the script without prompting for authorization but throws an exception if the script attempts to call the unauthorized service. |\n| `NOT_REQUIRED` | `Enum` | The user has granted this script all the authorization it currently requires. |"]]