Hi,
I have been trying to use Google Ads API for a project.
ruby version: 2.6.9
rails version: 5.1.7

I was just trying out this example here 
<https://github.com/googleads/google-ads-ruby/blob/main/examples/basic_operations/get_campaigns.rb>
 from 
the google ads repo <https://github.com/googleads/google-ads-ruby>, to get 
the campaigns info in the console. While running the block of code below




*responses.each do |response|   response.results.each do |row|     puts 
"Campaign with ID #{row.campaign.id} and name '#{row.campaign.name}' was 
found."   end*
*end*

its showing an error like this 

*GRPC::Unimplemented: 12:Operation is not implemented, or supported, or 
enabled.. 
debug_error_string:{"created":"@1650273920.527183000","description":"Error 
received from peer 
ipv4:142.250.183.202:443","file":"src/core/lib/surface/call.cc","file_line":906,"grpc_message":"Operation
 
is not implemented, or supported, or enabled.","grpc_status":12}*


If the code is run again its showing another error 

*GRPC::Core::CallError: Cannot run batch on closed call*


*Complete code I tried *

client = Google::Ads::GoogleAds::GoogleAdsClient.new do |config|

  config.client_id = *'* *'*

  config.client_secret = *'* *'*

  config.refresh_token = *'* *'*

  config.developer_token = *'* *'*

end


responses = client.service.google_ads.search_stream(
customer_id: ' ',
query: 'SELECT campaign.id, campaign.name FROM campaign ORDER BY 
campaign.id',
)


# Output of responses  

*#<Enumerator: ...>*



responses.each do |response|
  response.results.each do |row|
  puts "Campaign with ID #{row.campaign.id} and name '#{row.campaign.name}' 
was found."
  end
end


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/5a6d5363-fd5d-4c9e-8564-2d30a8fc2fccn%40googlegroups.com.

Reply via email to