Enum AuthorizationStatus
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
承認ステータススクリプトの承認ステータスを示す列挙型。
列挙型を呼び出すには、その親クラス、名前、プロパティを呼び出します。たとえば、
ScriptApp.AuthorizationStatus.REQUIRED
です。
プロパティ
プロパティ | タイプ | 説明 |
REQUIRED | Enum | 1 つ以上のサービスを使用できるように、このスクリプトを承認する必要があります。ほとんどの場合、スクリプトは次回実行時にユーザーに認可を求めます。ただし、スクリプトがインストール可能なトリガーを使用するアドオンとして公開されている場合、トリガーは認可を求めることなくスクリプトを実行しますが、スクリプトが未承認のサービスを呼び出そうとすると例外をスローします。 |
NOT_REQUIRED | Enum | ユーザーが、このスクリプトに現在必要なすべての承認を付与している。 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 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. |"]]