responses are empty

15 views
Skip to first unread message

Weijun Liu

unread,
Mar 27, 2024, 11:35:46 AM3/27/24
to Google Ads API and AdWords API Forum
I have a question, could you please help me?
I follow the Ruby example in the official Google Ads documentation to get ad information, and the code is as follows:
client = Google::Ads::GoogleAds::Config.new do |c|
          c
.client_id = 'INSERT_CLIENT_ID_HERE'
          c
.client_secret = 'INSERT_CLIENT_SECRET_HERE'
          c
.refresh_token = 'INSERT_REFRESH_TOKEN_HERE'
          c
.developer_token = 'INSERT_DEVELOPER_TOKEN_HERE'
          c
.login_customer_id = 'INSERT_LOGIN_CUSTOMER_ID_HERE'
        end

        responses = client.service.google_ads.search_stream(
    customer_id: customer_id,
          query
: 'SELECT campaign.id, campaign.name FROM campaign ORDER BY            campaign.id)
 
I replaced the correct client_id, client_secret, refresh_token and refresh_token.The program runs normally without any errors, but the response I received is empty.
This is one request id: '_xD97Uvo0mVBNdnLajcLag'.

Please help me analyze the problem, I would be extremely grateful.
重新回答
|
|

Google Ads API Forum Advisor

unread,
Mar 27, 2024, 7:02:42 PM3/27/24
to halfbl...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for contacting the Google Ads API support team.

As you are getting an empty result for a search query, to assist you further, kindly provide us with the updated complete API logs (request and response with request-id and request header) generated at your end.

Since you are using the Ruby client library, if you haven't enabled the logging yet, I would request you to enable it by referring to this guide Ruby.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02s0Ha3:ref" (ADR-00228944)

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages