Hello guys, 

I'm developing an integration with you guys, basically the functionality I 
want to achieve is that my clients use my tool to add users to their 
remarketing lists.

To do that I've implemented the oauth flow and registered for the google 
api.

I'm storing the clientId, clientSecret and Adwords developer token (test 
for now), in my server, and then storing refresh tokens for each user who 
go through the oauth flow.

When i need some data from Google Apis, I run the code at the end of the 
post and then get the services needed.

Most of the times I get correct responses, but some times I get 
AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED, like this one:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
<soap:Header>
<ns2:ResponseHeader 
xmlns="https://adwords.google.com/api/adwords/cm/v201710"; 
xmlns:ns2="https://adwords.google.com/api/adwords/rm/v201710";>
<requestId>00055ef91cc02b680a81118635009f51</requestId>
<serviceName>AdwordsUserListService</serviceName>
<methodName>get</methodName>
<operations>1</operations>
<responseTime>48</responseTime>
</ns2:ResponseHeader>
</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>[AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED @ ; 
trigger:'&lt;null&gt;']</faultstring>
<detail>
<ns2:ApiExceptionFault 
xmlns="https://adwords.google.com/api/adwords/cm/v201710"; 
xmlns:ns2="https://adwords.google.com/api/adwords/rm/v201710";>
<message>[AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED @ ; 
trigger:'&lt;null&gt;']</message>
<ApplicationException.Type>ApiException</ApplicationException.Type>
<errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="AuthenticationError">
<fieldPath/>
<trigger>&lt;null&gt;</trigger>
<errorString>AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED</errorString>
<ApiError.Type>AuthenticationError</ApiError.Type>
<reason>CLIENT_CUSTOMER_ID_IS_REQUIRED</reason>
</errors>
</ns2:ApiExceptionFault>
</detail>
</soap:Fault>
</soap:Body>


private AdWordsSession initSession(String refreshToken) throws 
ValidationException, OAuthException {
    Credential credential = new OfflineCredentials.Builder()
            .forApi(OfflineCredentials.Api.ADWORDS)
            .withClientSecrets(clientId, clientSecret)
            .withRefreshToken(refreshToken)

            .build()
            .generateCredential();

    // Create a new AdWordsSession without using a properties file.
    return new AdWordsSession.Builder()
            .withDeveloperToken(developerToken)
            .withOAuth2Credential(credential)
            .build();
}








Any help will be appreciated.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/a34f1b16-140b-4748-a2a9-f8a69deca39a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • AuthenticationEr... Agusti Bau
    • Re: Authent... 'Vincent Racaza (AdWords API Team)' via AdWords API Forum
      • Re: Aut... Agusti Bau
        • Re:... 'Vincent Racaza (AdWords API Team)' via AdWords API Forum

Reply via email to