Common Errors

  • Common Google Ads API errors and their solutions are provided to help users troubleshoot issues.

  • Errors are categorized by type, such as AuthenticationError and AuthorizationError, with specific error codes and descriptions.

  • Solutions often involve validating input, checking account settings, ensuring correct token usage, or adjusting request parameters.

  • Resources like the error references page and the forum are available for further assistance with API errors.

This page lists common errors and provides tips on preventing and handling them. For a complete list of errors, review the error references. For further assistance, contact support.

google.rpc.ErrorInfo

ACCESS_TOKEN_SCOPE_INSUFFICIENT
SummaryThe OAuth 2.0 access token doesn't have the required scopes.
Common causes The request is denied because the provided access token doesn't include the Google Ads API OAuth 2.0 scope.
How to handle Make sure that the access token has the required scopes. A common reason for this error is that you are reusing an existing access token that was generated using a different set of OAuth scopes. See the OAuth authorization parameters for an example of how to generate a new access token with the required scopes.
Prevention tips Ensure that the access token has the required scopes. Reauthenticate your user with the required scopes to obtain an access with the required scopes. If your application uses multiple OAuth scopes, you may need to implement Granular OAuth permissions.

google.auth.exceptions.RefreshError

invalid_grant
SummaryToken has been expired or revoked.
Common causes A Google Cloud Platform project with an OAuth consent screen configured for an external user type and a publishing status of Testing is issued a refresh token expiring in 7 days.
How to handle Your Google project's publishing status is Testing so the refresh token expires every 7 days and receives an invalid_grant error. Go to the Google API Console and navigate to the OAuth consent screen. Then change the publishing status to In production to avoid the refresh token expiring in 7 days.
Prevention tips See Unverified apps.

AdError

CANNOT_USE_AD_SUBCLASS_FOR_OPERATOR
SummaryThis operator cannot be used with a subclass of Ad.
Common causes Trying to modify attributes other than the status of the ad.
How to handle N/A
Prevention tips Once an ad is created, it cannot be modified. If you would like to modify the ad, you must make a new ad and then remove the old one. The status of the ad is, however, modifiable using MutateAdGroupAds.
INVALID_INPUT
SummaryOne of the fields in an ad contains invalid characters.
Common causes Using special characters in URLs.
How to handle N/A
Prevention tips Validate URLs in your app before making the API request.
LINE_TOO_WIDE
SummaryOne of the fields in an ad was longer than the maximum allowed length. See