Apps Script의 고급 서비스를 사용하면 숙련된 개발자가 HTTP 인터페이스를 사용하는 것보다 적은 설정으로 특정 공개 Google API에 연결할 수 있습니다.
고급 서비스는 기본적으로 이러한 Google API를 래핑하는 얇은 래퍼입니다. Apps Script의 기본 제공 서비스와 매우 유사하게 작동합니다. 예를 들어 자동 완성을 제공하며 Apps Script에서 승인 흐름을 자동으로 처리합니다.
하지만 스크립트에서 사용하려면 먼저 고급 서비스를 사용 설정해야 합니다.
고급 서비스로 사용할 수 있는 Google API를 확인하려면 참조에서 고급 Google 서비스 섹션을 확인하세요. 고급 서비스로 제공되지 않는 Google API를 사용하려면 다른 외부 API와 마찬가지로 연결하면 됩니다.
고급 서비스 또는 HTTP?
각 고급 Google 서비스는 공개 Google API와 연결되어 있습니다.
Apps Script에서는 고급 서비스를 통해 이러한 API에 액세스하거나 UrlFetch를 사용하여 API 요청을 직접 수행하면 됩니다.
고급 서비스 메서드를 사용하는 경우 Apps Script에서 승인 흐름을 처리하고 자동 완성 지원을 제공합니다. 하지만 이 기능을 사용하려면 먼저 고급 서비스를 사용 설정해야 합니다. 또한 일부 고급 서비스는 API에서 사용할 수 있는 기능의 일부만 제공합니다.
UrlFetch 메서드를 사용하여 API에 직접 액세스하는 경우 기본적으로 Google API를 외부 API로 취급합니다. 이 방법을 사용하면 API의 모든 측면을 사용할 수 있습니다. 하지만 API 승인을 직접 처리해야 합니다. 필요한 헤더를 구성하고 API 응답을 파싱해야 합니다.
일반적으로 가능한 경우 고급 서비스를 사용하고 고급 서비스에서 필요한 기능을 제공하지 않는 경우에만 UrlFetch 메서드를 사용하는 것이 가장 쉽습니다.
스크립트 프로젝트에서 2019년 4월 8일 이후에 생성된 기본 GCP 프로젝트를 사용하는 경우 고급 서비스를 사용 설정하고 스크립트 프로젝트를 저장하면 API가 자동으로 사용 설정됩니다. 아직 동의하지 않은 경우 Google Cloud 및 Google API 서비스 약관에 동의하라는 메시지가 표시될 수도 있습니다.
스크립트 프로젝트에서 표준 GCP 프로젝트 또는 이전 기본 GCP 프로젝트를 사용하는 경우 GCP 프로젝트에서 고급 서비스의 해당 API를 사용 설정해야 합니다. 이 설정을 변경하려면 GCP 프로젝트에 대한 수정 액세스 권한이 있어야 합니다.
고급 서비스는 일반적으로 해당 공개 API와 동일한 객체, 메서드 이름, 매개변수를 사용하지만 메서드 서명은 Apps Script에서 사용할 수 있도록 변환됩니다. 스크립트 편집기의 자동 완성 기능은 일반적으로 시작하는 데 충분한 정보를 제공하지만 아래 규칙에서는 Apps Script가 공개 Google API에서 메서드 서명을 생성하는 방법을 설명합니다.
Google API에 대한 요청은 경로 매개변수, 쿼리 매개변수, 요청 본문, 미디어 업로드 첨부파일 등 다양한 유형의 데이터를 허용할 수 있습니다. 일부 고급 서비스는 특정 HTTP 요청 헤더 (예: Calendar 고급 서비스)도 허용할 수 있습니다.
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eApps Script's advanced services simplify connections to Google APIs, offering features like autocomplete and automatic authorization handling.\u003c/p\u003e\n"],["\u003cp\u003eChoose between advanced services or the \u003ccode\u003eUrlFetch\u003c/code\u003e method for API access, weighing the convenience of advanced services against the flexibility of \u003ccode\u003eUrlFetch\u003c/code\u003e for full API functionality.\u003c/p\u003e\n"],["\u003cp\u003eEnable advanced services in your script project and potentially the corresponding API in your Google Cloud Platform project for access.\u003c/p\u003e\n"],["\u003cp\u003eMethod signatures in Apps Script for advanced services are generally derived from the structure of corresponding public Google APIs.\u003c/p\u003e\n"],["\u003cp\u003eRefer to the support resources for the specific underlying API when facing issues with advanced services, as they act as wrappers for those APIs.\u003c/p\u003e\n"]]],[],null,["# Advanced Google services\n\nThe advanced services in Apps Script let experienced developers connect to\ncertain public Google APIs with less set-up than using their HTTP interfaces.\nAdvanced services are essentially thin wrappers around those Google APIs. They\nwork much like Apps Script's\n[built-in services](/apps-script/guides/services)---for example, they offer\nautocomplete, and Apps Script handles the\n[authorization flow](/apps-script/guides/services/authorization) automatically.\nHowever, you must [enable an advanced service](#enable_advanced_services) before\nyou can use it in a script.\n\nTo see which Google APIs are available as advanced services, look for the\n**Advanced Google Services** section in the\n[Reference](/apps-script/reference). If you want to use a Google API that\nisn't available as an advanced service, just connect to it like any other\n[external API](/apps-script/guides/services/external).\n\nAdvanced services or HTTP?\n--------------------------\n\nEach of the advanced Google services is associated with a public Google API.\nIn Apps Script, you can access these APIs via advanced services or by simply\nmaking the API requests directly using\n[`UrlFetch`](/apps-script/reference/url-fetch).\n\n**If you use the advanced service method** , Apps Script handles the\n[authorization flow](/apps-script/guides/services/authorization) and offers\nautocomplete support. However, you must\n[enable the advanced service](#enable_advanced_services) before you can use\nit. In addition, some advanced services only provide a subset of the\nfunctionality available in the API.\n\n**If you use the `UrlFetch` method to access the API directly** , you are\nessentially treating the Google API as an\n[external API](/apps-script/guides/services/external). With this method, all\naspects of the API can be used. However, it requires you to handle the API\nauthorization yourself. You must also construct any needed headers and parse\nthe API responses.\n\nIn general it's easiest to use an advanced service where possible and only\nuse the `UrlFetch` method when the advanced service doesn't provide the\nfunctionality you need.\n\nRequirements\n------------\n\nBefore you can use an advanced service, you must satisfy the following\nrequirements:\n\n1. You must [enable the advanced service](/apps-script/guides/services/advanced#enable_advanced_services) in your script project.\n2. You must make sure the API corresponding to the advanced service is enabled\n in the [Cloud Platform (GCP) project](/apps-script/guides/cloud-platform-projects)\n your script uses.\n\n If your script project uses a [default GCP project](/apps-script/guides/cloud-platform-projects#default_cloud_platform_projects)\n created on or after April 8, 2019, the API is enabled automatically\n after you enable the advanced service and save the script project. If you\n have not done so already, you may also be\n asked to agree to the [Google Cloud](https://cloud.google.com/terms/)\n and [Google APIs](/terms) Terms of Service as well.\n\n If your script project uses a\n [standard GCP project](/apps-script/guides/cloud-platform-projects#standard_cloud_platform_projects)\n or an older default GCP project,\n you must [enable the advanced service's corresponding API](/apps-script/guides/cloud-platform-projects#enabling_an_api_in_a_standard_gcp_project)\n in the GCP project manually. You must have edit access to the GCP project\n to make this change.\n\nSee [Cloud Platform projects](/apps-script/guides/cloud-platform-projects)\nfor more information.\n\nEnable advanced services\n------------------------\n\nTo use an advanced Google service, follow these instructions:\n\n1. Open the Apps Script project.\n2. At the left, click **Editor** code.\n3. At the left, next to **Services** , click **Add a service** add.\n4. Select an advanced Google service and click **Add**.\n\n| **Note:** If you're using a [standard GCP project](/apps-script/guides/cloud-platform-projects#standard_cloud_platform_projects) (or an older default GCP project that was created prior to April 8, 2019), you must also manually enable the API corresponding to the advanced service. Enable the API by doing the following:\n|\n| 1. Open the GCP project associated with your script in the [**Google Cloud console**](https://console.developers.google.com/apis/dashboard).\n| 2. At the top of the console, click into the search bar and type part of the name of the API (for example, \"Calendar\"), then click the name once you see it.\n| 3. On the next screen, click **Enable API**.\n| 4. Close the Google Cloud console and return to the script editor. Click **OK** in the dialog.\n\nAfter you enable an advanced service, it's available in autocomplete.\n\nHow method signatures are determined\n------------------------------------\n\nAdvanced services generally use the same objects, method names, and parameters\nas the corresponding public APIs, although method signatures are translated for\nuse in Apps Script. The script editor's\n[autocomplete function](/apps-script/guides/services#using_autocomplete)\nusually provides enough information to get started, but the rules below explain\nhow Apps Script generates a method signature from a public Google API.\n\nRequests to Google APIs can accept a variety of different types of data,\nincluding path parameters, query parameters, a request body, and/or a media\nupload attachment. Some advanced services can also accept specific HTTP request\nheaders (for example, the\n[Calendar advanced service](/apps-script/advanced/calendar)).\n\nThe corresponding method signature in Google Apps Script has the following\narguments:\n\n1. The request body (usually a resource), as a JavaScript object.\n2. Path or required parameters, as individual arguments.\n3. The media upload attachment, as a [`Blob`](/apps-script/reference/base/blob) argument.\n4. Optional parameters, as a JavaScript object mapping parameter names to values.\n5. HTTP request headers, as a JavaScript object mapping header names to header values.\n\nIf the method doesn't have any items in a given category, that part of the\nsignature is omitted.\n\nThere are some special exceptions to be aware of:\n\n- For methods that accept a media upload, the parameter `uploadType` is set automatically.\n- Methods named `delete` in the Google API are named `remove` in Apps Script, since `delete` is a reserved word in JavaScript.\n- If an advanced service is configured to accept HTTP request headers, and you set a request headers JavaScript object, then you must also set the optional parameters JavaScript object (to an empty object if you aren't using optional parameters).\n\nSupport for advanced services\n-----------------------------\n\nAdvanced services are just thin wrappers that enables the use of a Google\nAPIs within Apps Script. As such, any issue encountered while using them is\nusually an issue with the underlying API, not with Apps Script itself.\n\nIf you encounter a problem while using an advanced service, it should be\nreported using the support instructions for the underlying API. Links to these\nsupport instructions are provided in each advanced service guide in the\nApps Script [Reference](/apps-script/reference) section."]]