Replacement for the removed `XxxConstantService`s when upgrading from v9 to v10 ?

82 views
Skip to first unread message

Zhe Lin

unread,
Mar 1, 2022, 2:57:51 AM3/1/22
to Google Ads API and AdWords API Forum
Good day, Google Ads API team

I 'm trying to upgrade from Google Ads API v9 to v10. I can see the following services are removed.

Services I'm using but missing in v10:
OperatingSystemVersionConstantService
MobileDeviceConstantService
MobileAppCategoryConstantService
UserInterestService
LanguageConstantService

However, I didn't find any instructions from the release notes. https://developers.google.com/google-ads/api/docs/release-notes#all_services

None of the above can be found when I tried to Ctrl+F the service name.

It would be very helpful if you can show me the replacement of them or any instructions to use them in v10.

Best regards,
Zhe Lin

Google Ads API Forum Advisor

unread,
Mar 1, 2022, 9:32:00 PM3/1/22
to zhe...@leadplus.co.jp, adwor...@googlegroups.com
Hi Zhe Lin,

Thank you for reaching out to our API support team.

As per this guide, it states that :

get methods have been removed. Any service that exclusively had a get method has been removed as well. The primary way to retrieve objects continues to be using GoogleAdsService's search and searchStream methods.

That being said, services such as the ones you listed which only contained get methods were removed in the new version. You may now use the search and searchStream methods (see also streaming guide) instead to retrieve details of your objects / resources. You may then refer to the list here, for which resources or reports to generate.

Best regards,

Google Logo
Peter Laurence
Google Ads API Team
 


ref:_00D1U1174p._5004Q2XkFSA:ref

Zhe Lin

unread,
Mar 3, 2022, 12:26:01 AM3/3/22
to Google Ads API and AdWords API Forum
Hi Peter,

Thanks for your reply!
I replaced all those service names with `GoogleAdsService` in my code and it works fine now.

Best regards,
Zhe


Reply all
Reply to author
Forward
0 new messages