Stay organized with collections Save and categorize content based on your preferences.
The advanced services in Apps Script let experienced developers connect to certain public Google APIs with less set-up than using their HTTP interfaces. Advanced services are essentially thin wrappers around those Google APIs. They work much like Apps Script's built-in services—for example, they offer autocomplete, and Apps Script handles the authorization flow automatically. However, you must enable an advanced service before you can use it in a script.
To see which Google APIs are available as advanced services, look for the Advanced Google Services section in the Reference. If you want to use a Google API that isn't available as an advanced service, just connect to it like any other external API.
Advanced services or HTTP?Each of the advanced Google services is associated with a public Google API. In Apps Script, you can access these APIs via advanced services or by simply making the API requests directly using UrlFetch
.
If you use the advanced service method, Apps Script handles the authorization flow and offers autocomplete support. However, you must enable the advanced service before you can use it. In addition, some advanced services only provide a subset of the functionality available in the API.
If you use the UrlFetch
method to access the API directly, you are essentially treating the Google API as an external API. With this method, all aspects of the API can be used. However, it requires you to handle the API authorization yourself. You must also construct any needed headers and parse the API responses.
In general it's easiest to use an advanced service where possible and only use the UrlFetch
method when the advanced service doesn't provide the functionality you need.
Before you can use an advanced service, you must satisfy the following requirements:
You must make sure the API corresponding to the advanced service is enabled in the Cloud Platform (GCP) project your script uses.
If your script project uses a default GCP project created on or after April 8, 2019, the API is enabled automatically after you enable the advanced service and save the script project. If you have not done so already, you may also be asked to agree to the Google Cloud and Google APIs Terms of Service as well.
If your script project uses a standard GCP project or an older default GCP project, you must enable the advanced service's corresponding API in the GCP project manually. You must have edit access to the GCP project to make this change.
See Cloud Platform projects for more information.
Enable advanced servicesTo use an advanced Google service, follow these instructions:
After you enable an advanced service, it's available in autocomplete.
How method signatures are determinedAdvanced services generally use the same objects, method names, and parameters as the corresponding public APIs, although method signatures are translated for use in Apps Script. The script editor's autocomplete function usually provides enough information to get started, but the rules below explain how Apps Script generates a method signature from a public Google API.
Requests to Google APIs can accept a variety of different types of data, including path parameters, query parameters, a request body, and/or a media upload attachment. Some advanced services can also accept specific HTTP request headers (for example, the Calendar advanced service).
The corresponding method signature in Google Apps Script has the following arguments:
Blob
argument.If the method doesn't have any items in a given category, that part of the signature is omitted.
There are some special exceptions to be aware of:
uploadType
is set automatically.delete
in the Google API are named remove
in Apps Script, since delete
is a reserved word in JavaScript.Advanced services are just thin wrappers that enables the use of a Google APIs within Apps Script. As such, any issue encountered while using them is usually an issue with the underlying API, not with Apps Script itself.
If you encounter a problem while using an advanced service, it should be reported using the support instructions for the underlying API. Links to these support instructions are provided in each advanced service guide in the Apps Script Reference section.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-04 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-04 UTC."],[[["Apps Script's advanced services simplify connections to Google APIs, offering features like autocomplete and automatic authorization handling."],["Choose between advanced services or the `UrlFetch` method for API access, weighing the convenience of advanced services against the flexibility of `UrlFetch` for full API functionality."],["Enable advanced services in your script project and potentially the corresponding API in your Google Cloud Platform project for access."],["Method signatures in Apps Script for advanced services are generally derived from the structure of corresponding public Google APIs."],["Refer to the support resources for the specific underlying API when facing issues with advanced services, as they act as wrappers for those APIs."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4