About migration from Google Ads API v6

38 views
Skip to first unread message

mingo

unread,
Sep 10, 2021, 5:32:07 AM9/10/21
to AdWords API and Google Ads API Forum
Hi,
I'm using the Google Ads API to get a conversion action ID.
I was using v6 until the other day, but I upgraded to v8 because I received a notice that the request will be closed.
However, since 9/8, the request has failed.
Looking at the migration guide, I don't think there were any changes to the 'search' method. Is this mentioned somewhere in the documentation?
The error status and Ruby source code are as follows.

ruby/2.7.0/gems/google-ads-googleads-12.0.2/lib/google/ads/google_ads/v8/services/google_ads_service/client.rb:247:in `search'

client = Google::Ads::GoogleAds::GoogleAdsClient.new do |config|
  config.client_id = ENV['GOOGLE_CLIENT_ID']
  config.client_secret = ENV['GOOGLE_CLIENT_SECRET']
  config.refresh_token = ENV['REFRESH_TOKEN']
  config.developer_token = ENV['DEVELOPER_TOKEN']
end
ga_service = client.service.google_ads
response = ga_service.search(
  customer_id: conversion_api.sub_account_id,
  query: query
)

Thanks.

mingo

unread,
Sep 10, 2021, 6:20:36 AM9/10/21
to AdWords API and Google Ads API Forum
Hi, 

I found a page In the reference that describes the search method.
According to this, if the options argument is not needed, the conventional way of passing arguments seems to be fine, but does the google-ads-ruby library cause an error?

I tried to fix it as below, but it still doesn't seem to work.

response = ga_service.search(
  request: {
    customer_id: customer_id,
    query: query,
  },
  options: {}
)
2021年9月10日金曜日 18:32:07 UTC+9 mingo:

Google Ads API Forum Advisor

unread,
Sep 13, 2021, 7:16:41 PM9/13/21
to 81m...@gmail.com, adwor...@googlegroups.com
Hello,

Thanks for reaching out. I understand you having an issue since upgrading from an earlier version. Can you please provide us with the complete request and response logs so that we can have a look at the issue?

Thanks,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


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