[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.(InternalApiErro]

1,399 views
Skip to first unread message

veesy...@gmail.com

unread,
Jul 23, 2013, 4:29:02 AM7/23/13
to adwor...@googlegroups.com
I m using google adwords api php sdk - v201306.When i try to mutate link using the below code
try {
            $user = new AdWordsUser();
            //$user->SetDeveloperToken($developerToken);
             $user->LogAll();
            // Load the oAuth settings
            $user->SetOAuth2Info($credentials);

            $managedCustomerService =
              $user->GetService('ManagedCustomerService', ADWORDS_VERSION);
            $linkOp = new LinkOperation();
            $link = new ManagedCustomerLink();
            $link->managerCustomerId = "***-***-****";
            $link->clientCustomerId = '***-***-****';
            $link->linkStatus = 'PENDING';
            //$link->pendingDescriptiveName = $pendingDescriptiveName;
            $linkOp->operand=$link;
            $linkOp->operator='ADD';
            $managedCustomerService->mutateLink($linkOp);

        } catch (Exception $e) {
            echo $e->getMessage();
        }

I got following response from the google adwords api server
[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.(InternalApiErro]

Waiting for updates................
WebRep
Overall rating
 

Takeshi Hagikura (AdWords API Team)

unread,
Jul 25, 2013, 1:42:04 AM7/25/13
to adwor...@googlegroups.com
Hi 

Is that error still happening? 
Sometimes you may encounter UNEXPECTED_INTERNAL_API_ERROR due to a temporal issue. 
So we recommend to implement error handling and retry logic 

Best,
- Takeshi, AdWords API Team

m...@adwordize.de

unread,
Jul 25, 2013, 4:46:16 AM7/25/13
to adwor...@googlegroups.com
Still getting same error
 [InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.(InternalApiErro]


One more Issue is not getting refersh token wirh access token
Is this because of test account or unapproved developer token.i m only getting access_token,expiresin,token_type there is no refresh token.

m...@adwordize.de

unread,
Jul 29, 2013, 12:52:36 AM7/29/13
to adwor...@googlegroups.com
Still Same Error, Not Able To Mutatelink using google adwords api v201306

Takeshi Hagikura (AdWords API Team)

unread,
Jul 29, 2013, 1:21:38 AM7/29/13
to adwor...@googlegroups.com
Hi, 

Can you please post the request xml including http headers? 
(Please remove the sensitive infomation such as developer token) 
I'm looking into that. 

Best,
- Takeshi, AdWords API Team

veesy...@gmail.com

unread,
Jul 29, 2013, 9:42:48 AM7/29/13
to adwor...@googlegroups.com
Here it is

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201306" xmlns:ns2="https://adwords.google.com/api/adwords/mcm/v201306">
  <SOAP-ENV:Header>
    <ns2:RequestHeader>
      <ns1:clientCustomerId>***-***-****</ns1:clientCustomerId>
      <ns1:developerToken>****************</ns1:developerToken>
      <ns1:userAgent>Adwords API Testing (AwApi-PHP/5.0.0, Common-PHP/5.0.0, PHP/5.4.7)</ns1:userAgent>
    </ns2:RequestHeader>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <ns2:mutateLink>
      <ns2:operations>
        <ns1:operator>ADD</ns1:operator>
        <ns2:operand>
          <ns2:managerCustomerId>1**-**-****</ns2:managerCustomerId>
          <ns2:clientCustomerId>1**-**-****</ns2:clientCustomerId>
          <ns2:linkStatus>PENDING</ns2:linkStatus>
        </ns2:operand>
      </ns2:operations>
    </ns2:mutateLink>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

HTTP/1.1 500 Internal Server Error
Content-Type: text/xml; charset=UTF-8
Content-Encoding: gzip
Date: Mon, 29 Jul 2013 04:45:58 GMT
Expires: Mon, 29 Jul 2013 04:45:58 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Content-Length: 575
Server: GSE

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <ResponseHeader xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201306" xmlns="https://adwords.google.com/api/adwords/mcm/v201306">
      <ns2:requestId>0004e29f2b23fd780a835f0100006abd</ns2:requestId>
      <ns2:serviceName>ManagedCustomerService</ns2:serviceName>
      <ns2:methodName>mutateLink</ns2:methodName>
      <ns2:operations>1</ns2:operations>
      <ns2:responseTime>229</ns2:responseTime>
    </ResponseHeader>
  </soap:Header>
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Server</faultcode>
      <faultstring>[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.&lt;init&gt;(InternalApiErro]</faultstring>
      <detail>
        <ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/mcm/v201306" xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201306">
          <ns2:message>[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.&lt;init&gt;(InternalApiErro]</ns2:message>
          <ns2:ApplicationException.Type>ApiException</ns2:ApplicationException.Type>
          <ns2:errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:InternalApiError">
            <ns2:fieldPath/>
            <ns2:trigger/>
            <ns2:errorString>InternalApiError.UNEXPECTED_INTERNAL_API_ERROR</ns2:errorString>
            <ns2:ApiError.Type>InternalApiError</ns2:ApiError.Type>
            <ns2:reason>UNEXPECTED_INTERNAL_API_ERROR</ns2:reason>
          </ns2:errors>
        </ApiExceptionFault>
      </detail>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>


Takeshi Hagikura (AdWords API Team)

unread,
Jul 31, 2013, 2:29:51 AM7/31/13
to adwor...@googlegroups.com
Hi, 

This Id should be long values. 

          <ns2:managerCustomerId>1**-**-****</ns2:managerCustomerId>
          <ns2:clientCustomerId>1**-**-****</ns2:clientCustomerId>

Can you please try it again with removing the "-" (dash)?

Best,
- Takeshi, AdWords API Team

m...@adwordize.de

unread,
Aug 1, 2013, 12:56:44 AM8/1/13
to adwor...@googlegroups.com
Thanks

Abhishek Pathak

unread,
May 10, 2016, 8:56:30 AM5/10/16
to AdWords API Forum
Hi,

I am getting similar kind of error since last two days. We do have a retry logic so after multiple attempts the request succeeds but the error keeps coming. Following is my request and response (sensitive info removed )

<2016-05-10 05:56:09,238>  WARN [main](com.google.api.ads.adwords.lib.client.AdWordsServiceClient.soapXmlLogger) - SOAP Request:
<?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Header>
        <ns1:RequestHeader xmlns:ns1="https://adwords.google.com/api/adwords/billing/v201509" soapenv:mustUnderstand="0">
            <ns2:clientCustomerId xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201509">************</ns2:clientCustomerId>
            <ns3:developerToken xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201509">***************</ns3:developerToken>
            <ns4:userAgent xmlns:ns4="https://adwords.google.com/api/adwords/cm/v201509">sokratiapi (AwApi-Java, AdWords-Axis/2.5.0, Common-Java/2.5.0, Axis/1.4, Java/1.6.0_21, jars)</ns4:userAgent>
            <ns5:validateOnly xmlns:ns5="https://adwords.google.com/api/adwords/cm/v201509">false</ns5:validateOnly>
            <ns6:partialFailure xmlns:ns6="https://adwords.google.com/api/adwords/cm/v201509">false</ns6:partialFailure>
        </ns1:RequestHeader>
    </soapenv:Header>
    <soapenv:Body>
            <serviceSelector>
                <ns7:fields xmlns:ns7="https://adwords.google.com/api/adwords/cm/v201509">BillingAccountId</ns7:fields>
                <ns8:fields xmlns:ns8="https://adwords.google.com/api/adwords/cm/v201509">EndDateTime</ns8:fields>
                <ns9:fields xmlns:ns9="https://adwords.google.com/api/adwords/cm/v201509">Id</ns9:fields>
                <ns10:fields xmlns:ns10="https://adwords.google.com/api/adwords/cm/v201509">SpendingLimit</ns10:fields>
                <ns11:fields xmlns:ns11="https://adwords.google.com/api/adwords/cm/v201509">StartDateTime</ns11:fields>
                <ns12:predicates xmlns:ns12="https://adwords.google.com/api/adwords/cm/v201509">
                    <ns12:field>BillingAccountId</ns12:field>
                    <ns12:operator>IN</ns12:operator>
                    <ns12:values>**********</ns12:values>
                </ns12:predicates>
            </serviceSelector>
        </get>
    </soapenv:Body>
</soapenv:Envelope>



<2016-05-10 05:56:09,238>  WARN [main](com.google.api.ads.adwords.lib.client.AdWordsServiceClient.soapXmlLogger) - SOAP Response:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
            <ns2:requestId>0005327694e3d8380a0dc084260db784</ns2:requestId>
            <ns2:serviceName>BudgetOrderService</ns2:serviceName>
            <ns2:methodName>get</ns2:methodName>
            <ns2:operations>1</ns2:operations>
            <ns2:responseTime>73</ns2:responseTime>
        </ResponseHeader>
    </soap:Header>
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Server</faultcode>
            <faultstring>[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.&lt;init&gt;(InternalApiErro]</faultstring>
            <detail>
                    <ns2:message>[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.&lt;init&gt;(InternalApiErro]</ns2:message>
                    <ns2:ApplicationException.Type>ApiException</ns2:ApplicationException.Type>
                    <ns2:errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:InternalApiError">
                        <ns2:fieldPath/>
                        <ns2:trigger/>
                        <ns2:errorString>InternalApiError.UNEXPECTED_INTERNAL_API_ERROR</ns2:errorString>
                        <ns2:ApiError.Type>InternalApiError</ns2:ApiError.Type>
                        <ns2:reason>UNEXPECTED_INTERNAL_API_ERROR</ns2:reason>
                    </ns2:errors>
                </ApiExceptionFault>
            </detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>

Umesh Dengale

unread,
May 27, 2016, 9:20:43 AM5/27/16
to AdWords API Forum
Hello,

Current thread is more than two year old. Could you please close the existing thread and create new thread with recent logs?

Thanks,
Umesh, AdWords API Team.



Reply all
Reply to author
Forward
0 new messages