getCustomers() returns AuthenticationError.CUSTOMER_NOT_FOUND in some cases

100 views
Skip to first unread message

Ondřej P

unread,
Jul 28, 2017, 7:12:54 AM7/28/17
to AdWords API Forum
Hi there,

I use getCustomers() operation (without clientCustomerId in request header) for getting list of user's customers, but in some cases I get following error:
Request:
    <soapenv:Header>
        <ns1:RequestHeader xmlns:ns1="https://adwords.google.com/api/adwords/mcm/v201705" soapenv:mustUnderstand="0">
            <ns2:developerToken xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201705">REDACTED</ns2:developerToken>
            <ns3:userAgent xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201705">unknown (AwApi-Java, AdWords-Axis/3.4.0, Common-Java/3.4.0, Axis/1.4, Java/1.8.0_72, maven)</ns3:userAgent>
            <ns4:validateOnly xmlns:ns4="https://adwords.google.com/api/adwords/cm/v201705">false</ns4:validateOnly>
            <ns5:partialFailure xmlns:ns5="https://adwords.google.com/api/adwords/cm/v201705">false</ns5:partialFailure>
        </ns1:RequestHeader>
    </soapenv:Header>
    <soapenv:Body>
        <getCustomers xmlns="https://adwords.google.com/api/adwords/mcm/v201705"/>
    </soapenv:Body>
</soapenv:Envelope>


Response: 
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
            <requestId>0005555e9a175f180a1b2f0fe60f323e</requestId>
            <serviceName>CustomerService</serviceName>
            <methodName>getCustomers</methodName>
            <operations>1</operations>
            <responseTime>414</responseTime>
        </ns2:ResponseHeader>
    </soap:Header>
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Server</faultcode>
            <faultstring>[AuthenticationError.CUSTOMER_NOT_FOUND @ ]</faultstring>
            <detail>
                <ns2:ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201705" xmlns:ns2="https://adwords.google.com/api/adwords/mcm/v201705">
                    <message>[AuthenticationError.CUSTOMER_NOT_FOUND @ ]</message>
                    <ApplicationException.Type>ApiException</ApplicationException.Type>
                    <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AuthenticationError">
                        <fieldPath/>
                        <trigger/>
                        <errorString>AuthenticationError.CUSTOMER_NOT_FOUND</errorString>
                        <ApiError.Type>AuthenticationError</ApiError.Type>
                        <reason>CUSTOMER_NOT_FOUND</reason>
                    </errors>
                </ns2:ApiExceptionFault>
            </detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>

I know that our authenticated user has an AdWords account, I tried to call the same request for 3 days but with the same result. I tried to revoke and get new refresh token as well. We use getCustomers() operation for each of our users and we detected this issue at around 10% of our users - it works fine for the rest of our users. Can you check this issue please?


Thank you,

Ondřej

Shwetha Vastrad (AdWords API Team)

unread,
Jul 28, 2017, 12:08:43 PM7/28/17
to AdWords API Forum
Hi Ondrej, 

Could you provide the email address used to generate the OAuth2 credentials for the API request which encountered this error? Please use Reply privately to author when responding. 

Thanks,
Shwetha, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages