애플리케이션에서 Apps Script API를 사용해야 하는 경우 애플리케이션의 Google Cloud 프로젝트에서 API를 사용 설정해야 합니다.
이를 통해 애플리케이션 사용자가 애플리케이션을 승인할 수 있도록 OAuth 사용자 인증 정보를 만들 수 있습니다.
서드 파티 애플리케이션에서 스크립트 프로젝트의 콘텐츠 또는 배포를 관리하도록 하려면 스크립트 프로젝트에 대한 액세스 권한을 부여해야 합니다.
앱에서 Apps Script API 사용
앱 내에서 Apps Script API를 사용하려면 애플리케이션의 GCP 프로젝트에서 Apps Script API를 사용 설정해야 합니다. Apps Script API를 사용 설정한 후 OAuth 사용자 인증 정보를 만들고 애플리케이션에 포함할 클라이언트 ID와 보안 비밀을 다운로드할 수 있습니다. Google Cloud 콘솔에서 API 사용량을 모니터링할 수도 있습니다.
이 마법사를 사용하여 API 콘솔에서 Google Cloud 프로젝트를 만들거나 선택하고 API를 자동으로 사용 설정할 수 있습니다. 또는 콘솔의 리소스 관리 페이지를 열고 프로젝트를 선택한 다음 프로젝트의 API 및 서비스 대시보드를 사용하여 Apps Script API를 수동으로 검색하고 추가할 수 있습니다. API를 사용 설정하면 API 및 서비스 > 사용자 인증 정보 패널에서 애플리케이션의 OAuth 사용자 인증 정보, 클라이언트 ID, 클라이언트 보안 비밀을 만들 수 있습니다.
Apps Script API를 사용하면 애플리케이션에서 스크립트와 배포를 만들고 수정할 수 있습니다. 악성 서드 파티 애플리케이션을 승인하면 이 애플리케이션이 더 많은 악성 스크립트를 만들거나 이미 있는 스크립트의 동작을 수정하여 좋지 않은 상황이 발생할 수 있습니다.
이러한 위험을 줄이기 위해 Apps Script API는 기본적으로 스크립트 프로젝트에 액세스할 수 없습니다. 스크립트 또는 배포를 생성하거나 수정하는 애플리케이션을 사용하려면 먼저 API 액세스 권한을 명시적으로 부여해야 합니다. 스크립트에 API 액세스 권한을 부여하면 승인한 애플리케이션이 API를 사용하여 스크립트 프로젝트를 관리할 수 있습니다.
API 액세스 권한을 먼저 부여하지 않고 영향을 받는 애플리케이션을 실행하려고 하면 오류가 발생합니다. 이 오류는 애플리케이션을 승인한 후에 발생합니다.
Apps Script 대시보드를 사용하여 스크립트 프로젝트에 대한 Apps Script API 액세스 권한을 부여할 수 있습니다. 대시보드를 사용하여 언제든지 이 액세스 권한을 취소할 수도 있습니다. API 액세스 권한을 부여하면 모든 애플리케이션에 권한이 부여됩니다. 하지만 개별 애플리케이션은 여전히 승인해야 합니다.
액세스 권한을 부여하기 전에 애플리케이션이 스크립트를 수정하도록 허용하는 데 위험이 따른다는 점을 이해해야 합니다. 악성으로 의심되는 애플리케이션은 승인하지 마세요.
[[["이해하기 쉬움","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-08-31(UTC)"],[[["\u003cp\u003eThe Apps Script API requires enabling in your Google Cloud project to use it within your own application, allowing you to create OAuth credentials for user authorization.\u003c/p\u003e\n"],["\u003cp\u003eTo allow external applications to manage your script projects, you must grant access to them through the Apps Script dashboard, understanding the potential security risks involved.\u003c/p\u003e\n"],["\u003cp\u003eGranting access enables third-party applications to create, modify, and deploy your Apps Script projects but does not automatically authorize them; individual authorization is still required.\u003c/p\u003e\n"],["\u003cp\u003eExecuting Apps Script functions through the API does not necessitate granting access to your script projects.\u003c/p\u003e\n"]]],[],null,["# Enabling script authorization and access\n\nThe Apps Script API requires different types of authorizations depending on\nyour goal:\n\n- Use the Apps Script API in your app.\n- Allow other applications to manage your script project data or deployments.\n\nIf you need to use the Apps Script API in your application, you must *enable*\nthe API in the application's\n[Google Cloud project](https://cloud.google.com/apis/docs/enable-disable-apis#enable_an_api).\nThis allows you to create OAuth credentials so that users of the application\ncan authorize it.\n\nIf you want to let third-party applications manage the content or deployment\nof your script projects, you must *grant access* to your script projects.\n\nUsing the Apps Script API in your app\n-------------------------------------\n\nIf you want to use the Apps Script API inside your app, you must enable\nthe Apps Script API in your application's GCP project. After\nenabling the Apps Script API, you can create OAuth credentials and download\nthe client ID and secret to include in your application. You can also\nmonitor the API usage in the\n[Google Cloud console](https://console.cloud.google.com/).\n\nYou can use\n[this wizard](https://console.developers.google.com/start/api?id=script)\nto create or select a Google Cloud project in the API console and automatically enable\nthe API. Alternatively, you can\n[open the console's **Manage Resources** page](https://console.cloud.google.com/cloud-resource-manager),\nselect a project, then search for and add the Apps Script API manually using the\nproject's **APIs \\& services** dashboard. Once you've enabled the API, you can\ncreate OAuth credentials, client IDs, and client secrets for your applications\nin the **APIs \\& services \\\u003e Credentials** panel.\n\nThe [Apps Script API quickstarts](/apps-script/api/quickstart/python#step_1_turn_on_the_api_name)\nprovide a step-by-step look at the whole process of enabling the API and\nsetting up authorization for an application.\n\nGranting third-party applications access to your script projects\n----------------------------------------------------------------\n\nThe Apps Script API can allow applications to create and modify your scripts\nand their [deployments](/apps-script/concepts/deployments). This can lead to\na bad situation if you authorize a malicious third-party application which\nthen proceeds to create more malicious scripts or modify the behavior of\nscripts you already have.\n\nTo help reduce this risk, the Apps Script API cannot access your script\nprojects by default. You must explicitly grant the API access before you can use\nany application that creates or modifies scripts or deployments. Once you've\ngranted the API access to your scripts, applications you authorize can use the\nAPI to manage your script projects.\n\nAn error results if you attempt to run an affected application without\nfirst granting the API access. This error occurs after you authorize the\napplication.\n| **Note:** Applications can use the Apps Script API to [execute Apps Script functions](/apps-script/api/reference/rest/v1/scripts/run). These API requests do not require granting access to your script projects.\n\nYou can grant the Apps Script API access to your script projects using the\n[Apps Script dashboard](/apps-script/guides/dashboard#settings). You can also\nuse the dashboard to revoke this access at any time. When you grant the\nAPI access, you are doing so for *all* applications. Individual applications\nstill need to be authorized, however.\n\nBefore you grant access, be sure you understand that there is a risk involved\nin allowing applications to modify your scripts. Never authorize any application\nthat you suspect is malicious."]]