How do you determine who is the right person. I am also getting this error and I cannot solve the issue. I have used my refresh token in the sample C# application and was able to pass authentication. Is it because this request needs an access token and not a refresh token?? Can we use refresh tokens instead of access tokens here??
On Monday, January 13, 2014 at 12:51:07 PM UTC-8, Ray Tsang (AdWords API Team) wrote:
-- On Monday, January 13, 2014 at 12:51:07 PM UTC-8, Ray Tsang (AdWords API Team) wrote:
Michel,It looks like you are using the AdWords API Java client library. In your ads.properties, you should have configured the client ID, client secret, and I assume you also have a refresh token configured.The AuthenticationError.NOT_ADS_USER indicates that the logged user doesn't have access to any AdWords account.The refresh token must belong to a user that has access the the AdWords account. I'm suspecting that the refresh token may be for a different user. When granting the authorization - please make sure the right user was logged in.Thanks,--Ray Tsang (AdWords API Advisor)On Tuesday, January 7, 2014 10:01:07 PM UTC-5, Michel Tricot wrote: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, OfflineConversionFeedServiceIn terface.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"?>We are getting AuthenticationError.NOT_ADS_
<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/ " soapenv:mustUnderstand="0">v201309
<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} :<message>[AuApiExceptionFault thenticationError.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>']
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 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+unsubscribe@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+unsubscribe@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/7f9ad0a7-d1f2-4e78-977f-21b4f1fed49e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment