Not Return Response

111 views
Skip to first unread message

Rajendra Yadav

unread,
Feb 28, 2023, 9:37:54 PM2/28/23
to Google Ads API and AdWords API Forum
Hi
I have tried below code it is not returing any response and Same code was working with v10 version when we have updated version v10 to v13 then it is not working

Please suggeste me  

 GoogleAdsServiceClient googleAdsService = client.GetService(
                Services.V13.GoogleAdsService);

            string searchQuery =
                $@"SELECT
                 ad_group.id,
                 ad_group_ad.ad.id,
                 ad_group_ad.ad.responsive_search_ad.headlines,
                 ad_group_ad.ad.responsive_search_ad.descriptions,
                 ad_group_ad.status
            FROM ad_group_ad
            WHERE
                ad_group_ad.ad.type = 'RESPONSIVE_SEARCH_AD'";


            if (adGroupId != null)
            {
                searchQuery += $" AND ad_group.id = {adGroupId} AND ad_group_ad.ad.id ={Id}  ORDER BY ad_group_ad.status ASC";
            }

            SearchGoogleAdsRequest request = new SearchGoogleAdsRequest()
            {
                CustomerId = customerId.ToString(),
                PageSize = PAGE_SIZE,
                Query = searchQuery
            };

            try
            {
              
                PagedEnumerable<SearchGoogleAdsResponse, GoogleAdsRow> searchPagedResponse =
                    googleAdsService.Search(request);

            
                foreach (GoogleAdsRow googleAdsRow in searchPagedResponse)
                {
                    Ad ad = googleAdsRow.AdGroupAd.Ad;
                    adsItem.Add(ad);
}
 }
            catch (GoogleAdsException e)
            {
}

Google Ads API Forum Advisor

unread,
Mar 1, 2023, 4:48:39 AM3/1/23
to rajen...@gmail.com, adwor...@googlegroups.com
Hi Rajendra,

Thank you for reaching out to the Google Ads API support team. I hope that you are doing well today.

We really do understand your concern, and to further investigate your concern, could you please provide us the complete request and response logs with request ID and request header generated on your end? If you haven't enabled the logging yet, you can enable the logging by following this guide.

You can provide it via Reply privately to the author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Kind regards,
Google Logo Google Ads API Team


ref:_00D1U1174p._5004Q2jHwwC:ref

Zweitze

unread,
Mar 1, 2023, 7:41:23 AM3/1/23
to Google Ads API and AdWords API Forum
You're using C#, right?

Note that if you are using:
  • .NET Framework (eg. 4.7.2)
  • WinForms project (but other project types may be affected too)
  • Synchronous calls
In that case, calling the API may hang. This problem was introduced in the Google Ads library some time ago - last August I believe. See

The solution would be to migrate to .NET Core, or use a different WinForms project, or, start using the async methods of the library.
That last option may be very hard, but usually you have no alternative.

Google Ads API Forum Advisor

unread,
Mar 1, 2023, 8:41:47 PM3/1/23
to zwe...@gmail.com, adwor...@googlegroups.com

Hello Zweitze,

Thank you for sharing your insights.

@Rajendra, you may try the shared information by Zweitze and let us know if it will work on your end. If not, then we would be waiting for the previously requested complete request and response logs with request ID and request header generated on your end so we can investigate further the issue.

You may send the requested details privately via "Reply To Author" option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Regards,

Rajendra Yadav

unread,
Mar 2, 2023, 1:16:10 AM3/2/23
to Google Ads API and AdWords API Forum
thanks Zweitze
Reply all
Reply to author
Forward
0 new messages