InternalApiError.UNEXPECTED_INTERNAL_API_ERROR with getBulkKeywordIdeas

62 views
Skip to first unread message

Ari

unread,
Sep 30, 2014, 1:32:51 PM9/30/14
to adwor...@googlegroups.com
Hi,

I'm using the getBulkKeywordIdeas function from the TargetingIdeaService and I'm constantly getting an "InternalApiError.UNEXPECTED_INTERNAL_API_ERROR".

I even tried removing required fields from the selector to see if I'd get a new error but I don't.

Here's the code I've been testing on and I've highlighted where the error has been occuring:

 {
            setClient(1234567); // Dummy Account Number

            string[] Seed = new string[1];
            Seed[0] = "blue suede shoes";

            string[] urls = new string[1];
            urls[0] = "www.payless.com";
         
            TargetingIdeaService.TargetingIdeaSelector selector = new TargetingIdeaSelector();
            TargetingIdeaService.TargetingIdeaPage tip;

            // URL
            RelatedToUrlSearchParameter relatedtoUrlSearchParameter = new RelatedToUrlSearchParameter();
            relatedtoUrlSearchParameter.urls = urls;

            // Keywords
            RelatedToQuerySearchParameter relatedToQuerySearchParameter = new RelatedToQuerySearchParameter();
            relatedToQuerySearchParameter.queries = Seed;
       
            // selector
            selector.requestType = RequestType.IDEAS;
            selector.ideaType = IdeaType.KEYWORD;
            selector.requestedAttributeTypes = new AttributeType[] { AttributeType.KEYWORD_TEXT, AttributeType.SEARCH_VOLUME, AttributeType.AVERAGE_CPC, AttributeType.COMPETITION};
            selector.searchParameters = new SearchParameter[] { relatedToQuerySearchParameter, relatedtoUrlSearchParameter };

            // Paging
            TargetingIdeaService.Paging paging = new TargetingIdeaService.Paging();
            paging.startIndex = 0;
            paging.numberResults = Seed.Length; // Max 800
            selector.paging = paging;
            
            try
            {
                using (ocs(wsrTargetingIdeaItem.InnerChannel)) wsrTargetingIdeaItem.getBulkKeywordIdeas(shTargetingIdeaItem, selector, out tip); // shTargetingIdeaItem is the Soap Header

                if (tip.entries != null && tip.entries.Length > 0)
                {
                    //foreach (TargetingIdeaService.Type_AttributeMapEntry tap in tip.entries)
                    //{

                    //}
                }
            }
            catch (Exception e)
            { DoException(e, "Google - Suggested Keywords", "Account: " + iAccount.ToString()); }

        }

Do you have any idea what's causing this?

Anash P. Oommen (AdWords API Team)

unread,
Oct 1, 2014, 2:02:28 PM10/1/14
to adwor...@googlegroups.com
Hi Ari,

Can you share the request id from a failed request? It is part of the SOAP response headers.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

Ari

unread,
Oct 1, 2014, 5:13:05 PM10/1/14
to adwor...@googlegroups.com
Hi Anash,

The getBulkKeywordIdeasResponse "retVal"  variable isn't even being set, that's where I'm getting the error, so I can't access the ResponseHeader property of "retval" so I'm unable to retrieve the requestId value.

public Google.AdWords2009.TargetingIdeaService.SoapResponseHeader getBulkKeywordIdeas(Google.AdWords2009.TargetingIdeaService.SoapHeader RequestHeader, Google.AdWords2009.TargetingIdeaService.TargetingIdeaSelector selector, out Google.AdWords2009.TargetingIdeaService.TargetingIdeaPage rval) {
            Google.AdWords2009.TargetingIdeaService.getBulkKeywordIdeasRequest inValue = new Google.AdWords2009.TargetingIdeaService.getBulkKeywordIdeasRequest();
            inValue.RequestHeader = RequestHeader;
            inValue.selector = selector;
            Google.AdWords2009.TargetingIdeaService.getBulkKeywordIdeasResponse retVal = ((Google.AdWords2009.TargetingIdeaService.TargetingIdeaServiceInterface)(this)).getBulkKeywordIdeas(inValue);
            rval = retVal.rval;
            return retVal.ResponseHeader;

On Tuesday, September 30, 2014 1:32:51 PM UTC-4, Ari wrote:

Ari

unread,
Oct 21, 2014, 5:01:04 PM10/21/14
to adwor...@googlegroups.com
Hi Anash,

I using Fiddler (thanks for letting me know about it, it's super useful!) I got the requestid:

000505f518efb7b80ae52c41f3000d6a
Reply all
Reply to author
Forward
0 new messages