(Translated by https://www.hiragana.jp/)
Google Ads Developer Blog: error handling

Starting July 14, 2025, Google Ads scripts will begin to throw errors for requests related to ad customizers for expanded text ads and feed-based legacy ad extensions.

Ad customizer changes

Starting July 14, 2025, Google Ads scripts will begin to throw errors for requests related to ad customizers for expanded text ads and feed-based legacy ad extensions.

Ad customizer changes

Any requests related to Ad Customizer entities, such as AdsApp.AdCustomizerSource or AdsApp.newAdCustomizerSourceBuilder, will begin to return sunset errors. These entities have been read-only since deprecation in 2022 and haven’t been served on any ads since May 2024. They were also fully removed from the Google Ads API in the v19 release.

Ad extension changes

Feed-based Ad Extensions were sunset in 2022 in favor of asset-based extensions. Users were asked to migrate, or were migrated automatically, but were able to access legacy functionality through the withOnlyLegacy() methods on various selectors. The withOnlyUpgraded() method was added to allow users to only use upgraded asset-based extensions. Starting July 14, 2025, the legacy functionality will be removed, and withOnlyLegacy() methods will begin to throw a sunset error. The withOnlyUpgraded() methods will log a warning, since it will no longer be necessary to specify the use of asset-based extensions when they are the only option.

If you have any questions, ask them in the Google Ads scripts forum. We're here to help!

Previously, if any Google Ads API request had an invalid developer token, the API returned an OAUTH_TOKEN_HEADER_INVALID error, which is also used for other invalid request header values. To make it clear when the authentication error is specifically caused by an invalid developer token, we are changing the API to return a new error code, DEVELOPER_TOKEN_INVALID, for version v19.1 of the Google Ads API. All API versions before v19 will handle invalid developer tokens by throwing a DEVELOPER_TOKEN_NOT_APPROVED error instead. If you are using version v19 of the API with our client libraries, you will need to update to the latest version of the client libraries after the v19.1 release. These changes will be effective starting April 28, 2025.

Previously, if any Google Ads API request had an invalid developer token, the API returned an OAUTH_TOKEN_HEADER_INVALID error, which is also used for other invalid request header values. To make it clear when the authentication error is specifically caused by an invalid developer token, we are changing the API to return a new error code, DEVELOPER_TOKEN_INVALID, for version v19.1 of the Google Ads API. All API versions before v19 will handle invalid developer tokens by throwing a DEVELOPER_TOKEN_NOT_APPROVED error instead. If you are using version v19 of the API with our client libraries, you will need to update to the latest version of the client libraries after the v19.1 release. These changes will be effective starting April 28, 2025.

Anyone who has already set up the Google Ads API to make successful calls are highly unlikely to be affected by this change. It is mainly meant to improve the experience of new developers onboarding to the API.

If you have any questions, please ask them in the Google Ads API forum. We're here to help!

The Google Ads Developers Channel is your video source for release notes, best practices, new feature integrations, code walkthroughs, and video tutorials. Check out some of the recently released and popular videos and playlists below, and remember to ...
The Google Ads Developers Channel is your video source for release notes, best practices, new feature integrations, code walkthroughs, and video tutorials. Check out some of the recently released and popular videos and playlists below, and remember to subscribe to our channel to stay up to date with the latest video content.

Google Ads API Best Practices - Error Handling and Debugging
In this episode of the Google Ads API Best Practices Series, we discuss how to handle errors that may occur when interacting with the Google Ads API, along with tools that may help you debug your applications, such as logging and the REST interface.
Meet the Team with David Wihl
In this video, David Wihl shares a bit about his role as a Developer Relations Engineer at Google and discusses his work in supporting the Performance Max campaign API integration.

[Live Demo] Building a Google Ads API Web App
Getting started with the Google Ads API? In this 8-episode series, we take a deep dive into developing web apps with the Google Ads API, with a focus on the OAuth flow, by building a multi-tenant app entirely from scratch.

Logging & Monitoring
This miniseries covers the basics of adding logging and monitoring to your Google Ads API integration and then goes into more advanced topics, with a special focus on Cloud tooling. Google Ads Query Language (GAQL)
In this series, we cover everything you need to know about the Google Ads Query Language to make reporting requests against the Google Ads API. We begin with the basics and build in subsequent episodes to cover various nuances of GAQL. We even dive into the various tools available to help you structure your queries. This playlist will equip you with the information you need to know to become a GAQL power user. For additional topics, including Authentication and Authorization and Working with REST, check out the Google Ads API Developer Series.

As always, feel free to reach out to us with any questions via the Google Ads API forum or at googleadsapi-support@google.com.