Google Ads Invalid Scope Name

1,212 views
Skip to first unread message

evensisftw

unread,
Dec 2, 2022, 1:06:00 PM12/2/22
to Google Ads API and AdWords API Forum
Hi,

I have my refresh token and everything working okay in that department. However, when I attempt to make an API call (the ad's scope has been added in the google cloud area), it complains of:

"You are receiving this error either because your input OAuth2 scope name is invalid or it refers to a newer scope that is outside the domain of this legacy API.

This API was built at a time when the scope name format was not yet standardized. This is no longer the case and all valid scope names (both old and new) are catalogued at https://developers.google.com/identity/protocols/oauth2/scopes. Use that webpage to lookup (manually) the scope name associated with the API you are trying to call and use it to craft your OAuth2 request."

This happens when attempting to create a conversion action via "\Google\Ads\GoogleAds\V12\Services\MutateConversionActions".

I have passed the auth scope of: https://www.googleapis.com/auth/adwords. But seemingly this must be incorrect. This API service has been enabled in the google api sarea.

Has anyone come across this before?

Many thanks.

Google Ads API Forum Advisor

unread,
Dec 5, 2022, 8:51:53 AM12/5/22
to adam.hal...@gmail.com, adwor...@googlegroups.com

Hi,

Thanks for reaching out to the Google Ads API Forum.

I understand you are attempting to create a conversion action via Google Ads API and encountered the error on your end. However, for us to investigate in depth, could you provide us the complete logs in the format of the request and response logs along with the request-id generated? Also, could you confirm if you generated a refresh token using this code example? If not, you may generate and retry your request.

For you to enable complete logs on your end for the client library, logging can be enabled by navigating to the Client libraries > Your client library (ex Python) > Logging documentation, which you can access from this link. You may provide the requested logs using reply privately to author option.

In addition, you may need to use the correct scope for Google Ads API. The present scope for the Google Ads API is: https://www.googleapis.com/auth/adwords.

Regards,

Google Logo
Yasar
Google Ads API Team
 


ref:_00D1U1174p._5004Q2gi03l:ref
Reply all
Reply to author
Forward
0 new messages