Apps Script는 코드 검사를 기반으로 승인 범위 (예: Google Sheets 파일 또는 Gmail 액세스)를 자동으로 결정합니다. 주석 처리된 코드도 승인 요청을 생성할 수 있습니다. 스크립트에 승인이 필요한 경우 스크립트를 실행하면 여기에 표시된 승인 대화상자 중 하나가 표시됩니다.
이전에 승인한 스크립트도 코드 변경으로 새 서비스가 추가되면 추가 승인을 요청합니다. 스크립트 소유자의 사용자 ID로 실행되는 웹 앱으로 스크립트에 액세스하는 경우 스크립트에서 승인을 요청하지 않을 수 있습니다.
액세스 권한 취소
스크립트의 데이터 액세스 권한을 취소하려면 다음 단계를 따르세요.
Google 계정의 권한 페이지로 이동합니다. (나중에 이 페이지로 이동하려면 Google.com을 방문한 다음 화면 오른쪽 상단에 있는 계정 사진을 클릭하세요. 그런 다음 내 계정을 클릭하고 '로그인 및 보안' 섹션에서 연결된 앱 및 사이트를 클릭한 다음 앱 관리를 클릭합니다.)
권한을 취소할 스크립트의 이름을 클릭한 다음 오른쪽의 삭제를 클릭하고 결과 대화상자에서 확인을 클릭합니다.
권한 및 스크립트 유형
스크립트가 실행되는 사용자 ID(따라서 액세스할 수 있는 데이터)는 아래 표와 같이 스크립트가 실행되는 시나리오에 따라 다릅니다.
스프레드시트 서비스, 문서 서비스, 슬라이드 서비스 또는 양식 서비스를 사용하는 애드온 또는 기타 스크립트를 빌드하는 경우 승인 대화상자에서 사용자의 모든 스프레드시트, 문서 또는 양식이 아닌 애드온 또는 스크립트가 사용되는 파일에 대한 액세스 권한만 요청하도록 강제할 수 있습니다. 이렇게 하려면 파일 수준 주석에 다음 JsDoc 주석을 포함하세요.
/***@OnlyCurrentDoc*/
스크립트에 @OnlyCurrentDoc를 선언하는 라이브러리가 포함되어 있지만 마스터 스크립트에서 실제로 현재 파일보다 많은 파일에 액세스해야 하는 경우 반대 주석 @NotOnlyCurrentDoc를 사용할 수 있습니다.
부가기능의 승인 수명 주기
Google Sheets, Docs, Slides, Forms의 부가기능은 일반적으로 문서에 바인딩된 스크립트와 동일한 승인 모델을 따릅니다. 하지만 특정 상황에서는 onOpen(e) 및 onEdit(e) 함수가 승인 없음 모드로 실행되어 몇 가지 추가적인 문제가 발생합니다. 자세한 내용은 부가기능 승인 수명 주기 가이드를 참고하세요.
OAuth 애플리케이션 사용자 한도
OAuth를 사용하여 Google 사용자 데이터에 액세스하는 애플리케이션(Apps Script 프로젝트 포함)에는 승인 한도가 적용됩니다. 자세한 내용은 OAuth 애플리케이션 사용자 한도를 참고하세요.
Apps Script를 사용한 재인증 동작
Apps Script는 Google Cloud 서비스 설정에서 구성한 재인증 빈도를 적용하지 않습니다. 이는 Apps Script가 직접적인 사용자 상호작용 없이 작동하는 트리거를 사용하여 자동으로 실행될 수 있기 때문입니다. 이러한 자동 실행은 재인증 프롬프트를 트리거하지 않습니다. Apps Script 애플리케이션은 지정한 기간(예: 12시간)이 지난 후 자동으로 재인증을 요청하지 않습니다.
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eApps Script requires user authorization to access private data from Google services, and requests are based on code analysis.\u003c/p\u003e\n"],["\u003cp\u003eUsers can revoke a script's access to their data through their Google Account permissions settings.\u003c/p\u003e\n"],["\u003cp\u003eA script's access level and the user it runs as depends on the type of script and how it's executed, like standalone, add-on, or web app.\u003c/p\u003e\n"],["\u003cp\u003eFor scripts interacting with Google Workspace files, specific annotations can limit authorization requests to the current file only.\u003c/p\u003e\n"],["\u003cp\u003eAdd-ons generally adhere to the authorization model of bound scripts, with exceptions for certain functions and circumstances.\u003c/p\u003e\n"]]],[],null,["# Authorization for Google Services\n\nApps Script requires user authorization to access private data from\n[built-in Google services](/apps-script/guides/services) or\n[advanced Google services](/apps-script/guides/services/advanced).\n\nGranting access rights\n----------------------\n\nApps Script determines the authorization scopes (like access your Google Sheets\nfiles or Gmail) automatically, based on a scan of the code. Code that is\ncommented out can still generate an authorization request. If a script needs\nauthorization, you'll see one of the authorization dialogs shown here when it is\nrun.\n\nScripts that you have previously authorized also ask for additional\nauthorization if a code change adds new services. Scripts may not request\nauthorization if you access the script as a web app that runs under\n[the script owner's user identity](/apps-script/execution_web_apps#permissions).\n| **Warning:** Web apps and other scripts that use sensitive scopes are subject to review by Google. Users attempting to authorize such apps may see a warning screen saying the app is *unverified* by Google. See [OAuth client verification](/apps-script/guides/client-verification) for details.\n\nRevoking access rights\n----------------------\n\nTo revoke a script's access to your data, follow these steps:\n\n1. Visit the [permissions](https://security.google.com/settings/security/permissions) page for your Google account. (To navigate to this page in the future, visit [Google.com](https://www.google.com), then click your account picture in the top-right corner of the screen. Next, click **My Account** , then **Connected apps \\& sites** under the \"Sign-in \\& security\" section, and then **Manage Apps**.)\n2. Click the name of the script whose authorization you want to revoke, then click **Remove** on the right, then **OK** in the resulting dialog.\n\nPermissions and types of scripts\n--------------------------------\n\nThe user identity that a script runs with --- and thus the data it can access ---\nvaries based on the scenario in which the script is run, as shown in the table\nbelow.\n\n| Type of script | Script runs as... |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Standalone](/apps-script/execution_script_editor), [add-on](/workspace/add-ons/overview), or [bound to Docs, Sheets, Slides, or Forms](/apps-script/guides/bound) | User at the keyboard |\n| [Custom function in a spreadsheet](/apps-script/execution_custom_functions) | [Anonymous user](/apps-script/execution_custom_functions#permissions); however, [quota limits](/apps-script/guides/services/quotas) count against user at the keyboard |\n| [Web app](/apps-script/execution_web_apps) or [Google Sites gadget](/apps-script/execution_gadgets) | User at the keyboard or script owner, dependent on [options selected](/apps-script/execution_web_apps#permissions) when deploying the app |\n| [Installable trigger](/apps-script/understanding_triggers#Installable) | User who created the trigger |\n\nManual authorization scopes for Sheets, Docs, Slides, and Forms\n---------------------------------------------------------------\n\nIf you're building an [add-on](/workspace/add-ons/overview) or other script that\nuses the [Spreadsheet service](/apps-script/reference/spreadsheet),\n[Document service](/apps-script/reference/document),\n[Slides service](/apps-script/reference/slides), or\n[Forms service](/apps-script/reference/forms), you can force the authorization\ndialog to ask only for access to files in which the add-on or script is used,\nrather than all of a user's spreadsheets, documents, or forms. To do so, include\nthe following [JsDoc](https://jsdoc.app/) annotation in a file-level comment: \n\n /**\n * @OnlyCurrentDoc\n */\n\nAn opposing annotation, `@NotOnlyCurrentDoc`, is available if your script\nincludes a [library](/apps-script/guides/libraries) that declares\n`@OnlyCurrentDoc`, but the master script actually requires access to more than\nthe current file.\n\nAuthorization lifecycle for add-ons\n-----------------------------------\n\n[Add-ons](/workspace/add-ons/overview) for Google Sheets, Docs, Slides, and Forms\ngenerally follow the same authorization model as scripts that are\n[bound](/apps-script/guides/bound) to a document. In certain\ncircumstances, however, their `onOpen(e)` and `onEdit(e)` functions run in a\nno-authorization mode that presents some additional complications. For more\ninformation, see the\n[guide to the add-ons authorization lifecycle](/workspace/add-ons/concepts/addon-authorization#editor_add-on_authorization).\n\nOAuth application user limits\n-----------------------------\n\nApplications that use OAuth to access Google user data, including Apps\nScript projects, are subject to authorization limits. See\n[OAuth application user limits](https://support.google.com/cloud/answer/9028764)\nfor details.\n\nRe-authentication Behavior with Apps Script\n-------------------------------------------\n\nApps Script does not enforce the\n[re-authentication frequency](https://support.google.com/a/answer/9368756) that you\nconfigure in your Google Cloud Services settings. This is because\nApps Script can run automatically using triggers, which operate\nwithout direct user interaction. These automated executions don't trigger the\nre-authentication prompts. Your Apps Script application won't\nautomatically ask you to re-authenticate after the time period you've specified\n(for example, 12 hours)."]]