Hi,
We recently worked on integrating the OfflineConversionFeedService API in
our system.
We have the authentication mechanism working and we have been able to
upload a conversion sample to a real account that we used for test.
Two weeks ago we tried to upload real conversions on behalf of our
customer. This customer gave us permissions to upload conversions on their
account thru the OAuth authentication.
Here is a test code that we use to verify that the configuration should
work:
String clientId = "[truncated]";
String clientSecret = "[truncated]";
String developerToken = "[truncated]";
Credential oauthCredentials = new OfflineCredentials.Builder()
.forApi(OfflineCredentials.Api.ADWORDS)
.withClientSecrets(clientId, clientSecret)
.withRefreshToken("[truncated]") // our customer refresh token
.build().generateCredential();
AdWordsSession session = new AdWordsSession.Builder()
.withOAuth2Credential(oauthCredentials)
.withDeveloperToken(developerToken)
.withClientCustomerId("[truncated]") // our customer client customer
id
.withUserAgent("[truncated]")
.build();
AdWordsServices adWordsServices = new AdWordsServices();
String gclid = "[truncated]"; // google click id that we got from the
click
String conversionName = "[truncated]"; // our customer conversion name
String conversionTime = getTimestampForApi(System.currentTimeMillis());
Double conversionValue = 2.0;
OfflineConversionFeedServiceInterface offlineConversionFeedService =
adWordsServices.get(session, OfflineConversionFeedServiceInterface.class);
OfflineConversionFeed feed = new OfflineConversionFeed();
feed.setGoogleClickId(gclid);
feed.setConversionName(conversionName);
feed.setConversionTime(conversionTime);
feed.setConversionValue(conversionValue);
OfflineConversionFeedOperation offlineConversionOperation = new
OfflineConversionFeedOperation();
offlineConversionOperation.setOperator(Operator.ADD);
offlineConversionOperation.setOperand(feed);
OfflineConversionFeedReturnValue offlineConversionReturnValue =
offlineConversionFeedService
.mutate(new
OfflineConversionFeedOperation[]{offlineConversionOperation});
We validated with one of Google's employee that this code is working when
we ran tests on the account he gave us.
For our production customer we keep getting the following error:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<ns1:RequestHeader
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201309"
soapenv:mustUnderstand="0">
<ns1:clientCustomerId>[truncated]</ns1:clientCustomerId>
<ns1:developerToken>[truncated]</ns1:developerToken>
<ns1:userAgent>[truncated] (AwApi-Java, AdWords-Axis/1.20.0,
Common-Java/1.20.0, Axis/1.4, Java/1.6.0_65, maven)</ns1:userAgent>
<ns1:validateOnly>false</ns1:validateOnly>
<ns1:partialFailure>false</ns1:partialFailure>
</ns1:RequestHeader>
</soapenv:Header>
<soapenv:Body>
<mutate xmlns="https://adwords.google.com/api/adwords/cm/v201309">
<operations>
<operator>ADD</operator>
<operand>
<googleClickId>[truncated]</googleClickId>
<conversionName>[truncated]</conversionName>
<conversionTime>20140107 184907</conversionTime>
<conversionValue>2.0</conversionValue>
</operand>
</operations>
</mutate>
</soapenv:Body>
</soapenv:Envelope>
14/01/07 18:49:09 WARN AdWordsServiceClient.soapXmlLogger: SOAP Response:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<ResponseHeader
xmlns="https://adwords.google.com/api/adwords/cm/v201309">
<requestId>[truncated]</requestId>
<serviceName>OfflineConversionFeedService</serviceName>
<methodName>mutate</methodName>
<operations>0</operations>
<responseTime>57</responseTime>
</ResponseHeader>
</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>[*AuthenticationError.NOT_ADS_USER* @ ;
trigger:'<null>']</faultstring>
<detail>
<ApiExceptionFault
xmlns="https://adwords.google.com/api/adwords/cm/v201309">
<message>[AuthenticationError.NOT_ADS_USER @ ;
trigger:'<null>']</message>
<ApplicationException.Type>ApiException</ApplicationException.Type>
<errors
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="AuthenticationError">
<fieldPath/>
<trigger><null></trigger>
<errorString>AuthenticationError.NOT_ADS_USER</errorString>
<ApiError.Type>AuthenticationError</ApiError.Type>
<reason>NOT_ADS_USER</reason>
</errors>
</ApiExceptionFault>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Exception in thread "main" AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString: [*AuthenticationError.NOT_ADS_USER* @ ;
trigger:'<null>']
faultActor:
faultNode:
faultDetail:
{https://adwords.google.com/api/adwords/cm/v201309}ApiExceptionFault:<message>[
*AuthenticationError.NOT_ADS_USER* @ ;
trigger:'<null>']</message><ApplicationException.Type>ApiException</ApplicationException.Type><errors
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="AuthenticationError"><fieldPath/><trigger><null></trigger><errorString>AuthenticationError.NOT_ADS_USER</errorString><ApiError.Type>AuthenticationError</ApiError.Type><reason>NOT_ADS_USER</reason></errors>
[*AuthenticationError.NOT_ADS_USER* @ ; trigger:'<null>']
We are getting *AuthenticationError.NOT_ADS_USER *errors. Does anyone of
you have an idea on what might go wrong?
Let me know if you need more information, thanks for your answer.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.